Setup Jetty to run with Debugging enabled on port 8000
1 |
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000" |
Run Jetty using Maven Plugin
1 |
mvn jetty:run |
In NetBeans, Goto Debug→ Attach Debugger menu. Select Java Debugger(JPDA) and specify the port as 8000. Now you can debug the webapplication using NetBeans.
Posted in:
Programming
I have always disabled the Attach Debugger menu option in maven projects (NB 6.7.1) :-(
Thanks a lot! Worked for me!
Great tip! I would add export MAVEN_OPTS=”$MAVEN_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000″ as to not loose any previous options (for instance memory related).