This message was deleted.
# community-support
s
This message was deleted.
m
It doesn't seem like there's a way to disable the debugger on the original process, so the best option may just be to add a
org.gradle.debugfork
property.
Copy code
tasks.withType(JavaCompile) {
    // The Error Prone plugin uses a forking compiler for JDK 16+.
    // The 'org.gradle.debugfork' option has been added to enable debugging on the forked process.
    if (System.properties.getProperty('org.gradle.debugfork', 'false').toBoolean()) {
        // Use port 5006 on the off chance that the original process is listening for a debugger on port 5005.
        options.forkOptions.jvmArgs << '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006'
    }
}