Search code examples
tomcatremote-debugging

tomcat jpda start not waiting


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.


Solution

  • 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).