I want to debug a unit test – but it had better be easy!!You came to the right place. Maven runs the unit tests for you, so debug Maven itself! I set up 3 permanent environment variables like so: <p>MAVEN_OPTS=-Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5050 Then I have 2 scripts: maveny.bat<p> mavenn.bat<p> Of course there are lots of ways of doing this. The point is to get the suspend= set to 'y' for debugging and 'n' for Now I want to step through my unit test in Universal. I cd to common/universal and run: maveny I go to NB and attach to port 5050 and wait a few seconds while Maven builds the module. As soon as the building When I'm done with my debugging, I just run mavenn and go back to work. I always have the debugging turned on for Maven with suspend=n (why not?) |