Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

eclipse

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?

like image 953
GuruKulki Avatar asked Apr 08 '26 15:04

GuruKulki


2 Answers

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

like image 114
Pablo Fernandez Avatar answered Apr 11 '26 05:04

Pablo Fernandez


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.

Eclipse Remote Debug

like image 26
VonC Avatar answered Apr 11 '26 04:04

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!