After running tomcat using:
bin\catalina.bat jpda start
The problem is it doesnt seem to wait! it just goes ahead with starting up tomcat. I was expecting it to wait for me to connect to it using a remote debugger (in my case eclipse). I remember it working awhile back but no idea what happened all of a sudden.
Any ideas? Could there be another process trying to connect to that port? I even trying closing eclipse, and changing the JPDA_PORT but same problem.
Run TomEE+ in debug mode If you simply run catalina.sh jpda run in the bin folder of tomee deployment, the server starts in the debug mode but it will quckly pass your breakpoint before you attach your IDE to the server process.
A JPDA Transport is a method of communication between a debugger and the virtual machine that is being debugged (hereafter the target VM). The communication is connection oriented - one side acts as a server, listening for a connection. The other side acts as a client and connects to the server.
A simple way to see if Tomcat is running is to check if there is a service listening on TCP port 8080 with the netstat command. This will, of course, only work if you are running Tomcat on the port you specify (its default port of 8080, for example) and not running any other service on that port.
There is a parameter called JPDA_SUSPEND ((Optional) Java runtime options used when the "jpda start" command is executed. Specifies whether JVM should suspend execution immediately after startup. Default is "n".) in catalina.bat. I just set JPDA_SUSPEND to 'y'
set JPDA_SUSPEND=y
It works as expected now (i.e. waits).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With