如何在调试模式下在Eclipse中运行外部工具 [英] How to run an external tool in Eclipse in debug mode
问题描述
我缺少的是调试功能。有没有办法在Eclipse中以调试模式运行外部工具?
您可以连接到远程JVM已在调试模式下初始化。
ie在远程应用程序启动期间,您应该将参数传递给JVM类似于以下内容:
-Xdebug -Xnoagent -Xrunjdwp:transport = dt_socket,address = 6079,server = y,suspend = n
然后,您可以使用调试配置窗口,选择远程Java应用程序附加到Eclipse中的应用程序。在连接属性中,只需要主机名和端口号(我的情况下为6079)。
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 missing is debugging functionality. Is there any way of running an external tool in debug mode in Eclipse?
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.
这篇关于如何在调试模式下在Eclipse中运行外部工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!