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!
Here is how I (Byron) do it (Windows version):

I set up 3 permanent environment variables like so:

<p>MAVEN_OPTS=-Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5050
<p>MAVEN_OPTSN=-Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5050
<p>MAVEN_OPTSY=-Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5050

Then I have 2 scripts:

maveny.bat<p>
set MAVEN_OPTS=%MAVEN_OPTSY%

mavenn.bat<p>
set MAVEN_OPTS=%MAVEN_OPTSN%

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
the rest of the time. You will almost always want it set to 'n'!

Now I want to step through my unit test in Universal. I cd to common/universal and run:

maveny
<p>mvn

I go to NB and attach to port 5050 and wait a few seconds while Maven builds the module. As soon as the building
phase ends my BP gets hit, and I can do my debugging.

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?)