Coming Up for Air

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
:processResources UP-TO-DATE
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. ;)

tags: Gradle testing


Sample quote

Quote source