Question

It would be great if someone can help me on this:

I configured a tomcat server for doing remote debugging using eclipse:

I used the gui for tomcat7

If I run tomcat with the command -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n it works fine but If I put suspend=y in the above command tomcat sert hangs in starting state and does not stop at all even after 2-3 hours.

Était-ce utile?

La solution

When using suspend=y, the JVM remains suspended until a debug client connects.

To connect to the suspended Tomcat instance, you can create a new Eclipse Debug Configuration via Run->Debug Configurations. Then choose Remote Java Application. On the configuration panel, specify the host and port e.g. 8000 to connect. Finally, press Debug. This will attempt to connect to your suspended Tomcat instance. Once, the connection is made you can step through the code. (Of course, you must load that code into the Eclipse workspace)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top