Monday 10 November 2014

Remote Debugging of Jenkins "Maven Project" Jobs

To remote debug a Jenkins "Maven Project" job one has to add

 -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"   

to the "Goals" line of the Maven Build step. Also see http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html

Note: Do not add it to the JVM-Options line of the Maven Build step. If you do then Eclipse will be able to attach the the remote JVM but it will not stop on a breakpoint.