Linux under Debug mode start Tomcat for remote debugging __linux

Source: Internet
Author: User

Java EE Development of various types of resources download list, the history of the most complete IT resources, click to enter.

A Application Scenarios
In the actual testing process, you may encounter due to the continuity of program execution, we can not construct a test scenario to verify the correctness of a function, only through code-level debugging to verify that the function is correct. However, the development of local debugging is not convincing, when we testers must connect to the baseline version of Linux code for remote debugging


Two Debugging steps

1. Deploy service engineering to Tomcat under Linux, this document focuses on remote mode, and this is not a description of deployment in order to prevent document space redundancy.



2. Change the Tomcat remote debugging port

(1). Change the tomcat boot file remote debugging port on the Linux system, log on to the server, locate the Tomcat installation path, and go to the bin directory



(2). Open the catalina.sh file in the directory, find jpda_address= "8000", 8000 represents the remote debugging port, you can change to other not occupied port, after the change is completed save exit. The following figure



3. Start Tomcat in debug mode

(1). Enter the Tomcat bin directory, enter./catalina.sh jpda run or./catalina.sh JPDA Start command starts Tomcat



4. Configure MyEclipse Remote Debugging

(1). In the class that requires remote debugging, select the Debug Configurations menu to open the configuration interface, as shown in the following figure:







(2) Double-click the remote Java application entry in the list on the left, add the class to be debugged, and then click the <Debug> button after adding the host item and the port item to the right.

Host represents the Linux server IP on which Tomcat resides

Port represents the remote debugging ports configured in catalina.sh







5. Open IE browser, enter the URL to submit the request, at this time you are in the myeclipse inside is not see the code run to the end of the point of operation does not go down?

As shown in the following illustration:









Third, through the above steps can be connected to the remote server on the local code, so that the code-level test.

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.