开发者

Can I debug an application which is running on other eclipse instance?

I have two eclipse instances running.

  • And in one I开发者_C百科 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?


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


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.

Can I debug an application which is running on other eclipse instance?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜