How to run an external tool in Eclipse in debug mode

前端 未结 1 537
温柔的废话
温柔的废话 2021-01-13 15:08

For various reasons my project can only be run as a finished and packaged JAR (some magic happens at assembly), so I run it as an external tool in Eclipse.

What I\'m

1条回答
  •  轮回少年
    2021-01-13 15:33

    You can connect to a remote JVM, if it has been initialized in the debug mode.

    i.e. during the remote application startup you should pass arguments to the JVM similar to the following: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=6079,server=y,suspend=n

    Then you can attach to the application in Eclipse, using the "Debug configurations" window, selecting "Remote Java Application". In the connection properties nothing more than just the host name and port number (6079 in my case) is really required.

    0 讨论(0)
提交回复
热议问题