开发者

Is there a way to force Eclipse to automatically restart remote debugging (in listen mode)?

开发者 https://www.devze.com 2023-03-12 20:30 出处:网络
I\'m using Eclipse to remote debug an application that\'s in debug client-mode (i.e -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000 jvm startup parameters, and Eclipse has \"socket listen\" mode

I'm using Eclipse to remote debug an application that's in debug client-mode (i.e -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000 jvm startup parameters, and Eclipse has "socket listen" mode selected in the debugger settings instead of the default "socket attach" mode).

Problem is, once the remote application开发者_StackOverflow is started, connects to the Eclipse debugger, and finally exits... the Eclipse debugger stops listening for connections on the specified port.

Just an annoyance, but it'd be nice not to have to keep clicking on the debug button in Eclipse every time I need to debug the application (which needs to be started from outside of Eclipse obviously). Any ideas or tools out there for making this a little more automatic?


By the nature of the client mode debugging, you will possibly relaunch eclipse in debug mode (listen) manually because you will do the same with the client application (attaching it to the eclipse listening port using jdwp).

But you also can try create a launch configuration programatically using Eclipse SDK, implementing an algorithm to restart the "listen mode" when the vm exists.


Just a thought , Can you try using:

-Xrunjdwp:transport=dt_socket,server=y,**suspend=y**

Your application will be suspended till the time the debugger is attached, that way you would atleast be able to debug right from the entry point to your code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号