lapots
lapots

Reputation: 13395

debug two applications in tomcat in different eclipse instances

I have two server java applications.

One of the applications is running in one eclipse instance - it connected to remote tomcat application to port 5005.

Another application is running in another eclipse instances. But when I try to connect it to remote application to port 5005 - I've got connection refused error.

I start tomcat after setting JAVA_OPTS

C:\Users\username>set JAVA_OPTS=-Dapp.environment=LOCAL -Dapp.config.dir=/D:\config -Xms1024m -Xmx4096m -XX
:NewSize=512m -XX:MaxNewSize=1024m -XX:PermSize=512m -XX:MaxPermSize=2048m -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n

and then use catalina start.

So the question is:

How to allow debugging of two applications in different eclipse instances but connected to the same Tomcat instance?

Upvotes: 1

Views: 567

Answers (1)

Justin Paul Paño
Justin Paul Paño

Reputation: 936

You can make a separate copy of the Tomcat directory for the other Eclipse. Proceed with the normal process of creating new server with New -> Server. Be sure to select the duplicate Tomcat as the server. Then after that, double click the server in the Servers tab and change the Server Ports to be different with the first Tomcat instance.

Upvotes: 2

Related Questions