Gradle Tip: Better Test Debugging
Tuesday, Sep 24, 2013 |Gradle Tip: Better Test Debugging
In a recent post
, I showed how to attach a debugger to tests run from the command line via Gradle. While it worked, it turns out that it's a bit over kill. Try this instead:
$ gradle -Dtest.debug test
:compileJava
:processResources UP-TO-DATE
:classes
:compileTestJava
:processTestResources
:testClasses
:test
Listening for transport dt_socket at address: 5005
Attach your debugger to port 5005, and off you go. No need to modify your build. Kudos to the NetBeans debugger output for helping me find that. ;)