Hello. I have a problem with debugging an annotation processor. I googled a lot about “How to debug kapt” etc and only this topic with his last comment helped to enable my debug breakpoints.
My problem is that I have to reconnect my remote debugger each time when the gradle stops. The first time he stops when > Starting Daemon
, it is okay because by default -Dorg.gradle.debug=true
starts with suspend=y
option. However, next time he stops on :mymodule:compileKotlin
task and here I have to reattach my remote debugger. Does anyone occur the same problem?
Here are my settings:
Gradle plugin version inside the main build.gradle:
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
gradle.properties
kapt.incremental.apt=true
kapt.use.worker.api=true
kapt.include.compile.classpath=false
the command that I run:
gradle clean build -Dkotlin.compiler.execution.strategy="in-process" -Dorg.gradle.debug=true --no-daemon
Also If I remove -Dkotlin.compiler.execution.strategy="in-process"
it won’t work.