Debugging Gradle Tests: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


=Overview=
=Overview=
=Debugging in Command Line=
=Debugging in IDE=
=TO REFACTOR=


<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>

Revision as of 22:13, 1 June 2021

Internal

Overview

Debugging in Command Line

Debugging in IDE

TO REFACTOR

gradle test --debug-jvm

Gradle will suspend execution right before running tests and wait for debugger connection on port 5005.

TODO:




Further research is needed:

Start Gradle in debug mode:

./gradlew --no-daemon -Dorg.gradle.debug=true :my-subproject:test

It kept starting the daemon, in debug mode, and I could not debug the test. The default port is 5005.

TODO: https://docs.gradle.org/current/userguide/java_testing.html#sec:debugging_java_tests

When the Gradle daemon is active, this works: