Today got stuck in one of those famous Java issues – Things not working and there are no errors and no exceptions. Grrrrrrrrrrrrr, whyyyyyyyyyyyy…………
Resorted to one of my oldest friend - remote debugging.
But this time the situation was different. The servlet was running as an Extension to Eclipse Application published on embedded Jetty server.
But this time the situation was different. The servlet was running as an Extension to Eclipse Application published on embedded Jetty server.
Looked around how to start the embedded server in debug mode and specify the debug port. But most of the articles talked about some Maven configuration. I know, open source community is big fan of Maven but I haven’t worked much on that. And I just want to start the server in debug mode, why all pom.xml and other stuff. (can’t really understand why the documentation of even the most popular open source products is so bad, will talk about this some other day)
Anyways after lot of wild goose chase realized that as its embedded, I need to just remote debug the JVM. So did what you do to remote debug any java application:
In Eclipse IDE, added the following in the VM Arguments in my Eclipse Application launch configuration dialog:
-Xdebug -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n
-Xdebug -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n
No comments:
Post a Comment