flathub / org.eclipse.Java

https://flathub.org/apps/details/org.eclipse.Java
4 stars 11 forks source link

Debugging of JUnit test doesn't work due to network error #97

Open 6b6279 opened 2 months ago

6b6279 commented 2 months ago

Hello,

while trying to debug a JUnit test, the debugger simply crashes on start with these messages on the console:

ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:700]

I have already given Eclipse full network access, so I'm not sure how the Java process is refusing connection.

This appears some what similar to #36, which had CDT also refusing connection to a localhost port.

6b6279 commented 1 month ago

Adding 127.0.0.1 localhost into /etc/hosts fixes this issue. Not sure why... I was just trying out some of the fixes here, although most of them do not apply on Linux: https://stackoverflow.com/questions/7487526/unable-to-debug-in-java-with-eclipse