Eclipse for remote debugging (Tomcat remote debugging)

Source: Internet
Author: User

1. Configuring Tomcat

Linxu system: tomcat/bin/catalina.sh or startup.sh the beginning of the following additions:

Declare-x catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9998"

9998 is the port we are debugging remotely, which is used later.

2. Start Tomcat
Looking at the Tomcat console output, we can see that the configuration we just had is in effect and the output is as follows:

3. Configuring Eclipse
Click on the debug icon above Eclipse, select Debug configurations, open the window to find the remote Java application, such as:

You can create a remote debug by double-clicking the remote Java application, as configured:

Click Debug to enter debug mode.

4. Verification
We hit any code in the source code project that needs to be debugged, set breakpoints like normal local debug, and then initiate a request for a project deployed by the server.
As shown, Success!!!

Click on the icon circled above (Disconnect) to disconnect the debug mode.
After disconnecting debug mode, you can turn on debug mode at any time, such as Operation:

< finish >

Eclipse for remote debugging (Tomcat remote debugging)

Related Article

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.