How to enable Tomcat debugging -
i have tomcat installed on server , want able check if debuggin disabled/enabled. searched everywhere , found instructions below:
1. open user interface , navigate administration > system management > hosts > ui server. 2. select "use local settings" , check boxes enable tomcat logging , enable tomcat debugging. 3. save changes , restart services when prompted.
the problem is not clear whether need install additional admin console access features. appreciate or pointers in right direction. thank in advance
to enable debugging in tomcat can use jpda. jpda stands java platform debugger architecture , it's tool creating debugging applications. enable debugging, need specify 2 things. 1 transport mechanism move bits between debugger , debugee , other address debugging connections accepted. depending upon location of debugger , debugee transport mechanism different. export transport , address variables shown below.
export jpda_address=8000
export jpda_transport=dt_socket
after setting variables, can start tomcat using following command.
sudo catalina.sh jpda start.
i assuming have set tomcat_home environment variables if not start going bin directory of tomcat , use catalina.sh jpda start command.
the other way launch tomcat in debugging mode using java_opts. after setting environment variables can execute following command.
export java_opts=“-xdebug –xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8080″
in above command transport mechanism dt_socket. means transport mechanism used sending bits between debugger , debuggee socket transport mechanism. other transport mechanism dt_shmem (shmem shared memory). if want remotely debug go socket mechanism. if not want debug distant computer (the debugger , debugee in same system) use shared memory.
the value suspend=y tells jvm start in suspended mode , stay suspended until debugger attached it.
the value server=y used open socket , listen incoming debugger requests.
after run command, sudo sh catalina.sh run
Comments
Post a Comment