Skip to content
Advertisement

IDEA Jetty remote debug problem. I wanna debug the war files in webapps folder

I successfully connected to the remote jvm server, but I can only debug the start.jar. I extracted the war files at webapps folder and the breakpoint is useless. How can I debug the web code? Btw without maven.

Advertisement

Answer

Create a file ${jetty.base}/modules/remote-debug.mod with a variation of what you need for remote debug (different configuration for port or suspend?) …

[exec]
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9999

Then when you want debug just add the command line --module=remote-debug to your start.jar execution and the remote debug will be used for just that execution.

Then it’s just a matter of you starting a remote debug session in your IDE against the same configuration.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement