javaeclipseeclipse-plugineclipse-jdteclipse-mars

How to enable remote debugging for an Eclipse Application?


Im trying to enable remote debugging for an eclipse plugin project, for the purpose of using IntelliJ IDEA as a debugger.

The steps I've taken so far:

  1. Launch Eclipse.
  2. Run -> Debug Configurations...
  3. Create a new "Eclipse Application" (as to launch a local workspace which loads the plugin).
  4. Add -Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n to VM arguments.
  5. Press the Debug button.

I get the following error:

ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. Error occurred during initialization of VM agent library failed to init: jdwp

What steps should I be taking to get IntelliJ IDEA to be able to debug an Eclipse Plugin running in a runtime workspace?

enter image description here


Solution

    • Run -> Debug Configurations...
    • Add -Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n to VM arguments.

    This is redundant. Using a debug configuration already starts the application with the eclipse debugger attached to the process. Start it as a run configuration instead if you want to enable debugging through a server socket.

    You can then create an additional "remote java application" debug configuration to attach to that socket.