How to debug KSP using Idea and Gradle?
Running build
task from IDE in debug mode does not attach IDE to the process.
Is there any command-line way to make the processor wait until IDE attach to thte process?
(I'm using KSP 1.5.31-1.0.0
)
How to debug KSP using Idea and Gradle?
Running build
task from IDE in debug mode does not attach IDE to the process.
Is there any command-line way to make the processor wait until IDE attach to thte process?
(I'm using KSP 1.5.31-1.0.0
)
./gradlew :sample:build --no-daemon -Dorg.gradle.debug=true -Dkotlin.compiler.execution.strategy=in-process
If debugging without daemon is too slow (it has to start jvm everytime), ./gradlew -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket\,address=8765\,server=y\,suspend=n" ...
and attach to the KotlinCompileDaemon process in the debugger.
More info here: https://github.com/google/ksp/issues/31