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.
由于各种原因,我的项目只能作为完成和打包的JAR运行(在程序集中会发生一些神奇的事情),所以我将它作为Eclipse中的外部工具运行。
What I'm missing is debugging functionality. Is there any way of running an external tool in debug mode in Eclipse?
我缺少的是调试功能。有没有办法在Eclipse中以调试模式运行外部工具?
1 个解决方案
#1
You can connect to a remote JVM, if it has been initialized in the debug mode.
如果已在调试模式下初始化,则可以连接到远程JVM。
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
即在远程应用程序启动期间,您应该将参数传递给JVM,类似于以下内容:-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.
然后,您可以使用“调试配置”窗口连接到Eclipse中的应用程序,选择“远程Java应用程序”。在连接属性中,实际上只需要主机名和端口号(在我的情况下为6079)。
#1
You can connect to a remote JVM, if it has been initialized in the debug mode.
如果已在调试模式下初始化,则可以连接到远程JVM。
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
即在远程应用程序启动期间,您应该将参数传递给JVM,类似于以下内容:-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.
然后,您可以使用“调试配置”窗口连接到Eclipse中的应用程序,选择“远程Java应用程序”。在连接属性中,实际上只需要主机名和端口号(在我的情况下为6079)。