I want to start debug mode for my application. But I need to start the debug mode from command prompt. Is it possible ? And will the procedure vary between tomcat 5.5 to tomcat 6.?
If you have Tomcat running as a windows service, then configuring Tomcat to start up with ability to be debugged remotely is done by simply specifying the start up arguments in the run properties. With this added to the options, starting the Tomcat service would have remote debugging enabled.
To activate the debugger at the command prompt In the Session List window, do one of the following: Choose Debug Next. The debugger is now active and is waiting to attach to a session. Select a session, and then choose Debug.
$ catalina.bat jpda start
On Linux/Unix $ catalina.sh jpda start
More info ---->
https://cwiki.apache.org/confluence/display/TOMCAT/Developing
For windows first set variables:
set JPDA_ADDRESS=8000 set JPDA_TRANSPORT=dt_socket
to start server in debug mode:
%TOMCAT_HOME%/bin/catalina.bat jpda start
For unix first export variables:
export JPDA_ADDRESS=8000 export JPDA_TRANSPORT=dt_socket
and to start server in debug mode:
%TOMCAT_HOME%/bin/catalina.sh jpda start
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