What’s next

August 12, 2008

Remote debugging applications running from Eclipse with IntelliJ

Filed under: Java — stigl @ 1:38 pm
Tags: , , ,

I’m not an advocate for using Eclipse or any of it’s relatives (IBM RAD). But on some projects, I can’t avoid having to use it because the project only works on in Eclipse.
As often as I can, I will try to use IntelliJ because of its superior user interface. But when the code can’t run from IntelliJ, I’ve set up a quick tutorial to setting up cross IDE debugging.

In Eclipse:
Right click on the code to run to get context menu –> Run as –> Run
In “Run” Dialog, create new or choose existing profile –> Arguments –> VM Arguments = -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 –> Run

The application will now start and wait for the debugger. The console will say “Listening for transport dt_socket at address:5005”

In IntelliJ:
Menu Item “Run” –> “Edit Configurations” to open the “Run/Debug Configurations” dialog
Add new configuration (+ button) –> Remote –> Choose name for configuration –> ok
Enter appropriate breakpoints and start the debugger with the configuration and the console will say “Connected to the target VM, address: ‘localhost:5005′, transport:’ ‘socket’.
IntelliJ debugging bliss.



  1. thanks mate, this helped me out 🙂

    I was wondering how in the world do I tell intelliJ’s debugger to connect to a VM, now I found it.

    Comment by jrharshath — July 2, 2009 @ 7:42 am | Reply

  2. Thanks for this. Stuck using Eclipse to run an app. If I had to debug in it as well then I’d go mad …

    Comment by MuppetGate — October 11, 2012 @ 12:57 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: