Sorry I haven't found a more GUI-friendly way yet (and verified only on Netbeans 12.3), but:
a) If you already have a nbactions.xml
:
Add the following to the <actions/>
element:
<action>
<actionName>CUSTOM-Debug-all-tests</actionName> <!-- should be unique for this project -->
<displayName>Debug All Tests</displayName> <!-- will be displayed in context menu -->
<packagings>
<packaging>*</packaging> <!-- according to your needs, taken from pre-configured action -->
</packagings>
<goals> <!-- according to your needs, taken from pre-configured action -->
<goal>process-test-classes</goal>
<goal>surefire:test</goal>
</goals>
<properties> <!-- according to your needs, taken from pre-configured action -->
<forkMode>once</forkMode>
<maven.surefire.debug>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}
</maven.surefire.debug>
<jpda.listen>true</jpda.listen>
</properties>
</action>
(Of course you can modify & adjust it to your needs, but this works for a quickstart (maven) project. Also interesting: "Debug integration test" action!)
Then you can execute it from "Project context menu>Run Maven>Debug All Tests"!
b) If You don't have an nbactions.xml
(in your project) yet:
Just modify one of the pre-configured "Actions" (preferably "Debug (Integration) Test") from the "Actions" menu of "Project Properties", this (hitting "OK") will generate the according file at your project root. Then you can make it (maven-) executable as described above (a).(There must/should also be a way to run these Actions without modifying nbactions.xml
at least by implementing a custom plugin....but haven't found the action/menu/tab yet:))