Tomcat Remote Debugging

Source: Internet
Author: User

To configure a remote Linux server:

1, modify tomca/bin/startup.sh, the first line to add:

  
 
    1. declare -x CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"

Where address=9999 is the port number that is not being used. There are two ways to connect, for Dt_shmem and Dt_socket, respectively, for native debugging and remote debugging.

2. Check to see if the server's corresponding port has been monitored:

 
   
  
  1. netstat - antp | grep 9999

If the actual corresponding port has been monitored by Java, it succeeds. Otherwise, try to change the port number, or see if the corresponding Tomcat configuration is correct.

Local Configuration:

1. Open the menu Run>debug configutions.


Right-click:


In project, select the project you want to debug, enter the IP that requires the remote debugging project in Host, the IP where Tomcat is located, enter the port number set in port, such as the 9999set above, and then tick "allow Termination of remote VMS ", click" Apply ".

Then, start the server.

Select a well-configured run>debug configutions locally. Choose your own configuration of the information, Debug. Place a breakpoint at the point where you need to debug. Normal execution, which can be debugged locally when running to a breakpoint.



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Tomcat Remote Debugging

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.