Tomcat7 settings
Add a line in the Catalina. Sh File Header
Jpda_suspend = 'y'
This will pause the running of the Tomcat application when it starts, and wait for the jdb client to connect and issue the Run Command to start running.
Start the Tomcat program in remote debugging mode. The default listening port is 8000.
./Catalina. Sh JPDA start
Jdb connection
On the client, use commands to connect to the Tomcat server
Jdb-Attach 192.168.1.200: 8000-sourcepath/home/chenshu/work/myproject/src/main/Java/
-The sourcepath can be followed by Multiple Code Directories separated:
Jdb debugging
After the connection is successful, you can use the following command to set the breakpoint:
Stop at com. freebird. myservice: 33
Run run, start the service, and then send a request through the web page. The breakpoint takes effect.
You can also refer to this article to provide some valuable information:
Http://mo.morsi.org/blog/node/219