views:

65

answers:

2

Using intellij and maven pom files, how do i debug tests run inside the maven test goal?

When i run them directly in the code, it complains something about profiles missing, which i've ticked inside intellij's Maven Projects.

+1  A: 

I execute tests with the following options:

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

... and then connect to Maven with remote debugger.

Henryk Konsek
+1  A: 

What about a right click on your goal and "Debug [your goal]" (in your case the test goal)?

debug goal

Colin Hebert
Yeah, nothing to add. +1
Pascal Thivent
Ahh didn't think of that. Too late on a friday afternoon :D Thanks.
JavaRocky