Linux under Debug mode launches Tomcat for remote debugging

Source: Internet
Author: User

Java EE Development of various resources download list, history of the most 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 functionality is correct. However, the development of local debugging, it is not persuasive, then we testers must connect to Linux baseline version code for remote debugging


Two Debugging steps

1, the deployment of service engineering to Tomcat under the Linux system, this document is focused on remote mode, in order to prevent the document is cumbersome, the deployment project is not described here.



2. Change the Tomcat remote debugging port

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



(2). Open the directory under the catalina.sh file, locate the jpda_address= "8000", 8000 for the remote debugging port, can be changed to other ports that are not occupied, save exit after the change is complete. Such as



3. Start Tomcat in debug mode

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



4. Configuring MyEclipse Remote Debugging

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







(2) In the left list, double-click the remote Java application entry, add the class you want to debug, and then click the <Debug> button after adding the host and port entries to the right.

Host represents the Linux server IP where Tomcat resides

Port represents the remote debug port configured in catalina.sh







5. Open IE browser, enter the URL connection submit request, at this time you in the myeclipse inside see the code run to break point out of the run not down?

As shown in the following:









Third, through the above steps can be locally connected to the remote server code, so that code-level testing.

Linux under Debug mode launches Tomcat for 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.