Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to force Eclipse to automatically restart remote debugging (in 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 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?

like image 343
Manius Avatar asked Jun 11 '11 22:06

Manius


People also ask

How do I restart Java in debug mode?

You can restart running application by right clicking it in debug window and selecting "Terminate and relaunch".

How do I stop remote debugging?

05 On the General settings panel, under Debugging, select Off next to Remote debugging setting to disable remote debugging using Microsoft Visual Studio for the selected Azure App Services web application. Click Save to apply the changes.

How do I change the default debug in Eclipse?

Goto Windows - > preference -> General -> perspectives -> make default your perspective or press reset to default to forget the previous settings.


1 Answers

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.

like image 123
Michael Henrique Avatar answered Sep 18 '22 19:09

Michael Henrique