简体   繁体   中英

How to debug two applications running in two different Tomcat servers?

I am trying to debug the flow of the application. So in the process, I need to debug two applications running on two different tomcat servers(where a method in one application calls another method of different application). How can I achieve this in eclipse(is it possible)?

Note: Both the applications are in the same eclipse instance and does not have any debug configuration.

You have to start both Tomcats with jpda (debug mode), with their corresponding different debugging port. In example: 8000 for the first Tomcat and 9000 for the second one (note that this port is not related to the http port, which in Tomcat usually is 8080).

Then, on your eclipse you must set up two different debug configurations of type "Remote Application" pointing to the ports of each Tomcat (8000 and 9000). Start both debugging configurations ("attach" to the Tomcat process) and set your breakpoints in both projects.

As soon as you perform requests to any Tomcat, the execution should stop at any of your application breakpoints.

You are ready to start the execution of the flow you want to debug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM