I have a complex application with several different JVMs.
JVM 1 takes about 5 minutes to work, and then starts another JVM2 to do the extra work.
I want to debug JVM2. Therefore, I turn on the remote socket debugger when running the JVM2 script:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
And I configured my Eclipse Remote Debug Session as follows:
Connection Type: Standard (Socket Attach), Host: localhost, Port: 8000
If I wait for JVM2 to start, run the debugger, it works fine.
However, it is REALLY difficult to pay enough attention to click the debugger after 5 long minutes of waiting.
If I run the remote debugger before turning on JVM2 ... I get
Failed to connect to remote VM. Connection refused. Connection refused: connect
Is it ever possible for a remote debugger to try to connect?
I tried using the Eclipse Remote Debug Connection Type: Socket Listen , but this blocks the port, and JVM2 gives this error on startup:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113) ERROR: transport error 202: bind failed: Address already in use ["transport.c",L41] ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500] JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initialized
How can I remove the remote debugger again and again?