Search code examples
debuggingtomcatjvmintellij-idearemote-debugging

IDEA hangs on remote debugging port


I'm remote debugging a tomcat at another server. Tomcat is started with the following parameters (among others):

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5556

After tomcat startup, the remote port shows up:

itadmin@srv-app02:~$ netstat -tulpen | grep java
tcp        0      0 0.0.0.0:5556            0.0.0.0:*               LISTEN      1000       2005708     30667/java      
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      1000       2006491     30667/java 
....

After connecting the IDEA debugger seems to hang. I get no message about the successful connection to the remote JVM.

At the moment I have no idea what causes the problem. Any hints?


Solution

  • The common case for such problem is method breakpoints, it's mentioned in the FAQ.

    You say it was caused by line breakpoints which is weird, never seen such problem before, but in theory source code in the IDE and compiled classes on the server could be out of sync and the IDE could send target VM the instruction to stop on the breakpoint in the wrong place which the VM did and hung.