Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start debug mode from command prompt for apache tomcat server?

Tags:

java

tomcat

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.?

like image 660
Karthi Avatar asked May 22 '13 10:05

Karthi


People also ask

How do I debug Apache Tomcat?

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.

How do I run a debug in command prompt?

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.


2 Answers

On windows
$ catalina.bat jpda start 
On Linux/Unix
$ catalina.sh jpda start 

More info ----> https://cwiki.apache.org/confluence/display/TOMCAT/Developing

like image 127
Mohammad Adil Avatar answered Oct 03 '22 04:10

Mohammad Adil


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 
like image 33
krzysiek.ste Avatar answered Oct 03 '22 02:10

krzysiek.ste