Figured it out:
mvnDebug
instead of mvn
. E.g. mvnDebug clean
Remote JVM Debug
Configuration.
Very easy. I am using Intellj Idea 15.0.4
Here is a screenshot:
Old question, but I was having the same need and it took me a while to get it to work. Hopefully can help someone.
For test debugging use:
mvn <goal> -Dmaven.surefire.debug
or
mvn <goal> -Dmaven.failsafe.debug
When execution stops and listens to socket at address 5005 (default) you run your configured remote debugger.
How to configure it:
Run -> Edit configurations -> Remote Transport: socket Debugger mode: Attach Port: 5005 (default)
-> Save.
The easiest way to debug maven goal ONLY within IntelliJ is to create a regular maven goal and in the runner tab pass those VM options:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
Where 8000 is a port number for remote debugging.
Then create new Remote configuration with port 8000. Run this configuration after running maven goal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With