Can I debug an application that runs on another eclipse instance?

I have two eclipse instances.

  • And I have a code base.
  • And in another eclipse, I run the application.

So, is it possible to debug this application in eclipse, where I have the code base?

+3
source share
3 answers

I assume your assembly creates a JAR file? if so, then you can run the JAR from the console and then connect the eclipse debugger.

Check this tutorial , it is clear and with screenshots

+2
source

You must be able to start a remote debugging session.

1 / When starting the application from the first eclipse

specify the following parameter:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

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

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

( port 8000 ), " ".
. Eclipse.

Java-, .

Eclipse remote debug

+1

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

0
source

Source: https://habr.com/ru/post/1727269/


All Articles