Remote Debugging Eclipse/Raspberry

nonickatall

Mitglied
Hallo ich verzweifele langsam daran, das remote debugging unter Eclipse und einem Raspberry, der unter Debian läuft, zum laufen zu bringen.

Leider finde ich nur Tutorials, wo immer irgend was anders beschrieben oder nur halbherzig beschrieben ist.

Zum Beispiel ist da immer von dem Befehl:

Java:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

die Rede, aber nicht wo ich diesen Port einstelle. Aber das scheint zu laufen, SSH funktioniert und der Raspberry meldet auf der Konsole:

"Listening for transport dt_socket at address: 8000"

Dann ist da die Rede, dass man warten soll, bis die IDE sich connected. Davon sehe ich sowohl in der Konsole aber auch in Eclipse nichts.

Java (openjdk-11) läuft natürlich auf beiden Maschinen und auch das Java Programm läuft, sowohl unter Windows in Eclipse, als auf auf der Konsole vom Raspberry, wenn ich es da mit der normalen Java Syntax starte.

In Eclipse unter "Run/Debug Configuration"
ist eine "Remote Java Application" eingerichtet, in "Connection Properties" steht die IP des Raspberry und bei "Port" der Wert 8000.

Wenn ich dort "Debug" klicke, kommt folgende Fehlermeldung:

"'Launching MyHome' has encounterd a problem. Failed to connect to remote VM. Connection refused."

Schalte ich um auf die Debug Sicht, ändert sich nichts..

Jemand eine Idee was ich falsch mache?
 

nonickatall

Mitglied
Nachtrag:

Auf einer anderen Seite habe ich den Befehl nun als:

Java:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y  suspend=y -jar Dummy.jar

gefunden.. Hier wird ja die auszuführende Datei genannt, kommt also nicht automatisch aus Eclipse. Muss ich das, so wie in Java üblich, aus dem entsprechenden Verzeichnis starten? Wäre ja unlogisch, denn die Datei liegt ja nicht auf der Maschine, sondern soll ja gerade "remote debugged" werden...
 

nonickatall

Mitglied
Habe die Datei nun mal aus dem entsprechenden Verzeichnis mit:

Java:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y suspend=y -jar MyHome.jar Main 0

gestartet. Auch hier kommt; "Listening for transport dt-socket at address: 8000

Mit
Java:
java -jar MyHome.jar Main 0
startet das Programm regulär.

Auch hier:
"'Launching MyHome' has encounterd a problem. Failed to connect to remote VM. Connection refused."
 

nonickatall

Mitglied
Ich habe das jetzt mal nicht in einem SSH Fenster auf der Windows Maschine gemacht sondern den Code direkt im Terminal des Raspberry eingegeben.

Dort kommt dann: "ERROR: JDWP option syntax error: -agentlib:jdwp=transport=dt_socket,adress=8000,server=y"

Gebe ich dann eben:
Java:
java-agentlib:jdwp=transport=dt_socket,adress=8000,server=y - jar MyHome.jar Main 0

Kommt derselbe Fehler also: "ERROR: JDWP option syntax error: -agentlib:jdwp=transport=dt_socket,adress=8000,server=y"

o_Oo_Oo_O
 

nonickatall

Mitglied
Verstehe ich nicht.. Also:
Java:
java -Xdebug -Xrunjdwp:transport=dt_socket,*:8001,server=y suspend=y -jar MyHome.jar Main 0
?

Ich habe auch gesehen das in anderen Tutorials die Parameter server=y und suspend=y mit Komma getrennt sind..

Kannst du mir die korrekte Syntax sagen?
 

nonickatall

Mitglied
Danke, dann kommt:
"
ERROR: transport error 202: getaddrinfo: unknown host
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [:735]"

Ich glaube für heute gebe ich auf... o_O
 

nonickatall

Mitglied
Ok, da war noch ein Syntax Fehler..

Jetzt passiert was anderes...

Nun kommt:
"Listening for transport dt_socket at address: 8000"

Und wenn ich dann in Eclipse das Programm starte kommt auf der Konsole:

"Fehler: Hauptklasse suspend=y konnte nicht gefunden oder geladen werden
Ursache: java.lang.ClassNotFoundException: suspend=y"

Das klingt schon nach Fortschritt.. :D

Aber wo steckt nun der Fehler?
 

nonickatall

Mitglied
Ich habe es gefunden. Das Leerzeichen zwischen "server=y," und "suspend=yes" war zuviel.

Also die korrekte Syntax ist:
Java:
java agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=y [voll qualifizierter Klassenname + Parameter]

Dann geht es.. Mann ist das syntax sensibel... :oops:

Und das Ganze muss aus der SSL Shell ausgeführt werden.. Warum steht das nirgendwo? Oder suche ich falsch? :rolleyes:

Das war echt nervig.. Zum Beispiel hier:
https://risarora.wordpress.com/2013/06/29/how-to-remote-debug-a-java-application-in-eclipse/

Da steht die syntax ohne das "," und ich suche mir einen Wolf...

Aber... Danke für die Hilfe. 👍

Das mit dem "=*:" habe ich nirgendwo gesehen. Da hätte ich noch lange suchen können.

LG
Ralf
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
sham5 Eclipse-Remote-Debugging von Java mit mehreren Prozessen oder Ports oder Netzen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
D Eclipse Remote Debugging einer .jar IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
OnDemand Commit und Push to Remote REPO IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
Y GIT remote Problem keine Synchronisation IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
C Eclipse remote workspace IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
A GIT: Überschreiben des Lokalen Repos mit dem Remote Repo IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
W Remote Glassfish 3.1 unter NetBeans 6.9.1 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
fastjack Remote Code-Coverage durch Selenium-Tests IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
S Remote Workspace mit Eclipse 3.3 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
B Debugging in VS Code? Leider nicht möglich. IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
J Eclipse Mir werden keine Werte beim Debugging angezeigt. IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
C Eclipse Debugging: Variablenstruktur durchsuchen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
C Eclipse Wie während Debugging einen Thread-Exit machen? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
C Eclipse: Während Debugging Werte vom Array ändern IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
H Eclipse Debugging: GUI-Prog debuggen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
I Eclipse: Debugging-Problem IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
M Debugging-Fehler mit JBuilder 9 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
N Debugging-Problem mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
R Eclipse beim Ausführen zur Eingabe in die Konsole springen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
T Eclipse Java Projekt funktioniert in Eclipse, aber nach export kein Dateizugriff IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
M Eclipse oder IntelliJ? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
JonasM Gibt es eine Libary in Eclipse mit der ich Daten per USB an einen Microkontroller Senden kann? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
N Erstellen einer ausführbaren jar Datei in Eclipse (Linux Mint) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
O Eclipse stürzt beim Autovervollständigen ab IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
C In Eclipse Einrückung im Java-Editor einstellen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
Avalon html ist nicht html in eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
A Docker im Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
Robertop Eclipse resolved Target-Platform nicht wegen automatischem HTTPS IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
C Eclipse englisch, deutsche Kommentare leider rot unterkringelt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
T Eclipse von Java 1.8 auf 17 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
S [Eclipse] Zwei verschiedene Konfigurationen erstellen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
A Eclipse Projekt-Umzug mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
D Eclipse Eclipse und OpenGL IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
M Ausführbares Programm aus Eclipse exportieren IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
Java00User00 Eclipse Theme IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
F Eclipse für Java 1.8 ARM einrichten IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
D Crawler funktioniert in intellij aber in Eclipse nicht IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
U Problem mit Eclipse - WindowBuilder - memoryLeak? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 15
F Eclipse - Änderung am Code ohne Applikation Neustart IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
E Hilfe mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
B Eclipse version control System das ohne Internet funktioniert/nur lokal auf Computer? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
B Eclipse Problem mit jar Datei? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
N Eclipse erzeugt plötzlich keine (default package) mehr IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 24
F alle Eclipse Projekte auf git hochladen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
O Java Eclipse Umlaute werden nicht richtig dargestellt in Konsole IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 10
B .exe Datei für Eclipse Java Programm erstellen? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
Eclipse Build path duplication entry IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 11
B Wie nicht-java Datei mit Eclipse benutzen (Excel Datei einlesen)? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 16
T GlassFish mit Eclipse, Dynamic Web Projekt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
nbergmann Eclipse Eclipse-Concole: Ergebnis-Zahlenfolge erscheint kurz und verschwindet dann wieder IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 21
berserkerdq2 Eclipse Eclipse führt nicht dei Klasse aus, bei der ich bin, muss das immer manuell ändern, was tun? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
MiHimbert Eclipse + Wildfly26 + primefaces11 + openjdk18 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 22
S Eclipse Umlaute IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
S Fehlermeldung bei Nutzung Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
LimDul IDEA IntelliJ Tipps für den Umstieg von Eclipse auf intelliJ IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
Robertop Maven Warnung "'version' contains an expression but should be a constant" in Eclipse verstecken IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
J Eclipse - kein Server verfügbar zum ausführen meines Java Projektes IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 12
P PHP Skript wird nicht mit highlights markiert(Eclipse) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
B Eclipse Autovervollständigung zeigt nicht alle Methoden einer Klasse an IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
P Eclipse- Zip Datei als Prgramm IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
T Eclipse scheint awt Libary nicht zu besitzen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
G eclipse mit neuestem JDK einrichten IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
P Cucumber Plugin Installation . Eclipse Warnmeldung IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
J Eclipse CDT Library einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
J Javac File generieren Eclipse oder IntellJ (JNI) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
Eichi1979 Eclipse Fehler in Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 10
Arita wie kann man die automatische erstellte Ordner von Eclipse in D Drive ziehen? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
nonickatall paho.client.mqttv3 in Eclipse installieren/einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
A Einbindung von FXML-Dateien in Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
A JavaFX in Eclipse einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 22
H Outline Fenster (Gliederung) wird mit deutschem Sprachpaket nicht angezeigt, Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
M Kann EGit nicht auf Eclipse installieren? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
Tobero Eclipse Eclipse zeigt mir alles als Warnung an IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
B Versionen kontrollieren / dokumentieren mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
keinLebenNurCode Eclipse Eclipse: Gelbes Hilfsfenster für Funktionen und Methoden anzeigen lassen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
windl Probleme mit Eclipse unter Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
H Eclipse Fehler beim starten des Projekts IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
B Kompilieren in Eclipse ( 2 Klasse ohne main()-Methode) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
N Eclipse debug Gradle-Projekt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
R Eclipse-Fehler IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
M Eclipse - Fehlermeldung bei JavaFX-Projekt "java.lang.module.FindException: Module javafx.controls not found" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 23
P ERROR: org.eclipse.equinox.p2.engine code=0 session context was:(profile=C__Users_birgit_eclipse_java-2020-124_eclipse, phase=org.eclipse.equinox.inte IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
H eclipse Fehler: Hauptklasse konnte nicht gefunden - bei Umwandlung in git IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
H Eclipse - Refactoring - mehrere Pakete geleichzeitig verschieben IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
T Eclipse, Console gibt Fragezeichen zurück. IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
N Eclipse aus Java-Application JavaFX machenModule javafx.controls not found IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
K Eclipse Einstellung "kaputt" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
G Java Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
M Einzelne Java-Dateien mit Eclipse compilieren - Wie geht das? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
Robertop Eclipse Eclipse Startprobleme "Java was started but returned exit code=1" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
Splayfer Problem mit der Eclipse Autovervollständigung... IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
ruutaiokwu Eclipse inkonsistent?? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
T Eclipse - Keine Vorschläge außerhalb main-Methode IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
S Java8 Eclipse Nutzer will auf Java14 wechseln IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
H kann in Eclipse org.junit nicht importieren IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
C Eclipse Plugin ClassLoader IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
T Eclipse: Projekt aus meinem Workspace als Library auswählen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
ruutaiokwu Eclipse Eclipse-Plugin für UML "Reverse Engineering", um aus Code Klassendiagramme zu erstellen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
OSchriever Eclipse: JavaFX mit JDK11 nutzen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
S Wie importiere ich am besten grosse Projekte in Eclipse am Beispiel von Apache ANT IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4

Ähnliche Java Themen

Neue Themen


Oben