Home Navigation

Tuesday 2 January 2018

Debugging maven project, breakpoints don't work

By default, Maven runs your tests in a separate ("forked") process. You can use the maven.surefire.debug property to debug your forked tests remotely, like this:

mvn -Dmaven.surefire.debug test

For more information
http://maven.apache.org/surefire/maven-surefire-plugin/examples/debugging.html


In eclipse got to
Right click on the project -> Run As - > maven build ... -> build configuration

type "-Dmaven.surefire.debug test" in goal section

and add parameter forkCount = 0

Apply and hit debug