Use Eclipse on Windows to remotely debug Tomcat under Linux

Source: Internet
Author: User

1: Modify the catalina.sh of Tomcat on Linux, the first line adds Declare-x catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,server=y, suspend=n,address=9528 "

2: In Eclipse, point "Run->debug ...", select "Remote Java Application", follow the prompts to create a new, "Project" to select the project to debug the code, "host" Select the remote Linux host IP address, " Port Select 8000 on the previous line of address configuration, note that this is a separate, unoccupied port that is not the same as the application's port. 3: Run tomcatbincatalina.sh on Linux to start Tomcat with the following command: Enter the current Tomcatbin directory:./catalina.sh run (so you can see the information running information for Tomcat) or. startup.sh if prompt does not have permission, set permissions as root: chmod +x * * Listening for transport dt_socket at address:9528 " This information indicates that the debug port has been monitored 4: In the Eclipse on Windows "Run->debug ..." check the newly created, click "Debug", if everything is correct there is no prompt. The breakpoint you set in the code will then be executed. 5: About modifying the source code, because Java itself JPDA mechanism, the remote code running effect will be updated in time, but can not update the code on the remote server, this should be noted.

Use Eclipse on Windows to remotely debug Tomcat under Linux

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.