hello all, I’m trying to debug a custom annotatio...
# kapt
hello all, I’m trying to debug a custom annotation processor but I’m failing to be able to stop the debugger - already tried a couple of suggestions from: - https://discuss.kotlinlang.org/t/debug-annotation-processor-kapt/11369 but without any luck. I’m currently trying to run:
./gradlew --no-daemon :app:clean :app:compileDebugKotlin -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket\,address=5005\,server=y\,suspend=n"
and then to attach a remote configuration
This command works for me.
Copy code
./gradlew :module:kaptKotlin --no-daemon -Dorg.gradle.debug=true -Dkotlin.compiler.execution.strategy="in-process" -Dkotlin.daemon.jvm.options="-Xdebug,-Xrunjdwp:transport=dt_socket\,address=5005\,server=y\,suspend=n" --offline
I use the default “attach a remote configuration” setup
I was missing the
on gradle.properties 😕. Only with it set I was able to attach the debugger. Thank you!
👍 1
In case someone has the same issue - I’ve written a step-by-step guide to help: - https://medium.com/@cafonsomota/debug-annotation-processor-in-kotlin-6eb462e965f8 🙂