For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

debugTestsOn

abstract fun debugTestsOn(port: Int): TestLauncher(source)

Configures test JVM to run in debug mode.

When called, the forked test JVM is launched with the following argument:

-agentlib:jdwp=transport=dt_socket,server=n,suspend=n,address=localhost:<port>
This means the test JVM expects a debugger at the specified port that uses a socket listening connector. If the debugger is not present then the test execution will fail.

Invoking this method adjusts the test task to launch only one JVM. More specifically, the parallel execution gets disabled and the forkEvery property is set to 0.

Return

this

Since

5.6

Parameters

port

the target port where the test JVM expects the debugger