Making it possible to live-debug and add breakpoints to your code during a maven test goal in Intellij Idea, shouldn’t take more than a minute.
Modify your pom to have the debug process fork:
Next, configure your debug process. You reach that under
Run > Edit Configurationand add a Remote debugger:
- Once the above is configured, run the
mvn testgoal. It should pause, listening on port 5005…
- Now execute the remote debugger you configured earlier. It should attach on port 5005. If you don’t have any breakpoints, you should see the below. If you have breakpoints, obviously they will trigger…