{"id":2787,"date":"2022-07-18T16:51:19","date_gmt":"2022-07-18T14:51:19","guid":{"rendered":"https:\/\/ekiwi.de\/?p=2787"},"modified":"2022-07-18T16:51:24","modified_gmt":"2022-07-18T14:51:24","slug":"intellij-remote-debugging-mit-java-und-raspberry-pi","status":"publish","type":"post","link":"https:\/\/ekiwi.de\/index.php\/2787\/intellij-remote-debugging-mit-java-und-raspberry-pi\/","title":{"rendered":"IntelliJ &#8211; Remote Debugging mit Java und Raspberry Pi"},"content":{"rendered":"<p>Java-Programme \u00fcber SSH auf dem RPI debuggen.<\/p>\n<p><!--more--><\/p>\n<p>Wir erstellen eine neue Debug-Konfiguration und w\u00e4hlen SSH aus. In den ersten beiden Schritten geben wir IP-Adresse, Benutzername und Passwort an. Ein SSH-Key ist ebenfalls m\u00f6glich.<\/p>\n<p>Anschlie\u00dfend pr\u00fcft IntelliJ die Verbindung. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/07\/remote_1.png\" alt=\"\" width=\"847\" height=\"447\" class=\"alignnone size-full wp-image-2788\" srcset=\"\/wp-content\/uploads\/2022\/07\/remote_1.png 847w, \/wp-content\/uploads\/2022\/07\/remote_1-300x158.png 300w, \/wp-content\/uploads\/2022\/07\/remote_1-768x405.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/p>\n<p>Auf den ersten Blick sieht es gar nicht so toll aus. Befehle werden nicht gefunden, Ausgaben finden nicht statt. <\/p>\n<pre>\r\nSuccessfully connected to pi@192.168.0.100:22\r\n\r\n> pwd\r\n\/home\/pi\r\nCommand finished with exit code 0\r\nRsync command 'rsync' was not found neither in local PATH nor as full executable path\r\nStarting introspection for Java...\r\n> echo ${SHELL}\r\n\/bin\/bash\r\nCommand finished with exit code 0\r\n> echo ${JAVA_HOME}\r\nCommand finished with exit code 0\r\n> java -version\r\n\/bin\/bash: java: command not found\r\nCommand finished with exit code 127\r\nFailed to execute command\r\n\r\nIntrospection completed with error. Getting environment failed with exit value 127\r\n<\/pre>\n<p>Dies ist insofern verwunderlich, als diese Befehle oftmals bei direkter Eingabe funktionieren. Ein <a href=\"https:\/\/andydunkel.net\/2022\/07\/18\/java-17-jdk-auf-raspberry-pi-installieren\/\" target=\"_blank\" rel=\"noopener\">Java-SDK muss auf dem RPI installiert<\/a> sein. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/07\/remote_2.png\" alt=\"\" width=\"393\" height=\"75\" class=\"alignnone size-full wp-image-2789\" srcset=\"\/wp-content\/uploads\/2022\/07\/remote_2.png 393w, \/wp-content\/uploads\/2022\/07\/remote_2-300x57.png 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/p>\n<p>Im letzten Schritt k\u00f6nnen wir aber die Angaben selbst vervollst\u00e4ndigen, z.B. den &#8222;JDK home path&#8220; und die Version.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/07\/remote_3.png\" alt=\"\" width=\"847\" height=\"507\" class=\"alignnone size-full wp-image-2790\" srcset=\"\/wp-content\/uploads\/2022\/07\/remote_3.png 847w, \/wp-content\/uploads\/2022\/07\/remote_3-300x180.png 300w, \/wp-content\/uploads\/2022\/07\/remote_3-768x460.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/p>\n<p>Fertig! Anschlie\u00dfend l\u00e4uft das Debugging. Starten wir das Projekt, wird es auf den RPI \u00fcbertragen, ausgef\u00fchrt und debuggt.<\/p>","protected":false},"excerpt":{"rendered":"<p>Java-Programme \u00fcber SSH auf dem RPI debuggen.<\/p>\n","protected":false},"author":1,"featured_media":218,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[13],"tags":[],"class_list":["post-2787","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programmierung"],"_links":{"self":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/comments?post=2787"}],"version-history":[{"count":0,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/posts\/2787\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media\/218"}],"wp:attachment":[{"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/media?parent=2787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/categories?post=2787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ekiwi.de\/index.php\/wp-json\/wp\/v2\/tags?post=2787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}