Search code examples
tomcatintellij-ideatomcat7remote-debuggingintellij-14

Intellij debugging tomcat


I know this has been asked a few times already but none of the posted solutions seem to help. I'm trying to debug an application deployed on Tomcat installed locally.

Starting tomcat with these options:

set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 %JAVA_OPTS%

Created a remote debug configuration (NOT tomcat remote) and connecting to localhost/127.0.0.1 on port 8000. I get this error:

Unable to open debugger port (localhost:8000): java.io.IOException "handshake failed - connection prematurally closed"

I should mention that I have done this same setup many times before and never faced any issue. No idea why this is happening now.

Thanks for any help!


Solution

  • Ok solved it. For some reason localhost/127.0.0.1 were not working. So i tried the full host name and it worked.