Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 816
starman1979 Avatar asked Feb 10 '23 06:02

starman1979


1 Answers

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

like image 115
starman1979 Avatar answered Feb 15 '23 10:02

starman1979