Search code examples
eclipsedebuggingtomcatspring-mvcremote-debugging

Tomcat : Unable to connect for remote debugging


I am trying to debug server side code (running on Tomcat) using eclipse's remote debug option. This issues is showing up intermittently and rest of the times it works just fine. I have made sure 1) Server side has got the latest Jars - I copied the .war file and redeployed. 2) Tomcat is running on debug mode and firewall settings have been modified to allow connections on the debug port. 3) Verified that before the attempt to connect, on the server its listening on the debug port and afterwards it shows that connection has been established.

but Eclipse is throwing an error popup saying "Its unable to connect to the remote VM" and sometimes it times out waiting for a packet #

Should I be checking for some more things? Are there any more log files by eclipse that throws light on what went wrong? Please help


Solution

  • This is can be a solution sometimes if your debugger fails to connect to debugger with an error something like "timed out while waiting for a packet #packetnumber" then it could be because of the low timeout setting and slow network. One can increase the timeout value using debug setting in the eclipse preferences.