Breakpoints don't work when debugging maven project?

I am trying to debug a unit test in a Maven project.   Normally I would just set up a JUnit test configuration in Intellj and set a breakpoint on the line I'm interested in.   Unfortunately this particular bug only shows when a certain Maven profile is used.  

I have set up a Maven test configuration and can run it (with the profile) and duplicate the bug, but none of my breakpoints ever activate.   The execution blazes right through all of them, writes an output on that very line that tells me the test has failed, and completes without ever activating my breakpoint.   

Is there something "special" I have to do to get a Maven configuration to run in debug mode and stop at my breakpoints?   

I'm using JDK 7, IDEA 14.1.2, and Maven 3.3.1.   Screenshot of my settings attached.

2015-05-12 12_43_24-Run_Debug Configurations.png
Comment actions Permalink

Add: -DforkCount=0 -DreuseForks=false  

And you could probably make your life easier by using Maven Helper plugin 

Comment actions Permalink

Thanks, I will try these things!


Please sign in to leave a comment.