Jdb remote debugging Tomcat 7

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.