views:

403

answers:

1

For various reasons my project can only be run as a finished and packaged JAR (some magic happens at assembly), so I run it as an external tool in Eclipse.

What I'm missing is debugging functionality. Is there any way of running an external tool in debug mode in Eclipse?

+2  A: 

You can connect to a remote JVM, if it has been initialized in the debug mode.

i.e. during the remote application startup you should pass arguments to the JVM similar to the following: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=6079,server=y,suspend=n

Then you can attach to the application in Eclipse, using the "Debug configurations" window, selecting "Remote Java Application". In the connection properties nothing more than just the host name and port number (6079 in my case) is really required.

Grzegorz Oledzki