• Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote debugging Tomcat on a Remote Machine (Intelij 13)  RSS feed

 
Mike London
Ranch Hand
Posts: 1505
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to debug a running application on another server running Tomcat and all you have is an IP for that server and the application name, it's a bit confusing to get this working in, say, Intelij 13.

So, you need to run "Catalina.sh jpda start" to start Tomcat in debug mode. But this is the remote machine, correct? Not the local machine.

Your source code needs to be local, not on the remote machine, correct?

In Intellij, if you don't pick "Same File System" for Tomcat, then you have to pick ftp, sftp, or other like that.

Regardless of what I picked, I was unable to remotely debug the application on the other server.

Here's what I did to set up a remote debug session in Intelij 13:

1. On the remote machine, I started tomcat with "jpda start" so Tomcat would run in debug mode.

The source code on the remote machine was compiled with the debug option.

2. On the development machine, in the "after launch" dialog, I put: "http://192.168.168.11:8080/theApplication"

(this is the same path that works locally to bring up the app).

3. On the development machine for Remote staging: Picked "Same File System"
(tried others but they didn't work either)

4. On the development machine for Remote Connection Settings, I entered: "http://192.168.168.11/theApplication, and 8080 for the port.

This is the correct way to start the app on the remote machine.

5. On the development machine for Deployment and logs tabs - no changes.

6. On the development machine for startup/connection tab

for debug: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y

(socket port = 8000).

---------

Yet, when I try to connect to the remote machine, I get the error that Intellij cannot connect to the remote machine.

I can actually bring up the application in the browser remotely so I must be doing something wrong.

The Intellij "help" on this topic is unhelpful as it's too generic with no actual example.

Look forward to any suggestions.

Thanks,

mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!