tags:

views:

21

answers:

3

I have two eclipse instances running.

  • And in one I have the code base.
  • And in other eclipse i am running the application.

So can I debug this application in the eclipse where I have code base?

A: 

You should be able to launch a remote debug session

1/ Specify the following option when launching the app from the first eclipse

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

2/ Launch a Remote Java App (Run > Debug> Debug Configurations... > Remote Java Application.)

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

(if port 8000 is free) in order to debug the app from the "code base" eclipse.
See Remote Debugging with Eclipse.

You can specify the sources in the Remote Java App configuration by referencing your own code base.

alt text

VonC
A: 

Yes, you can attach the debugger to a remote JVM. See How to attach debugger to running process?

Jeremy Raymond
+1  A: 

I imagine your build produces a JAR file? if so, then you can run the JAR from the console and then plug the eclipse debugger.

Check this tutorial, that is clear and with screenshots

Pablo Fernandez