- 
                Notifications
    You must be signed in to change notification settings 
- Fork 8
How to debug Kotlin Compiler Plugin
        Jens Klingenberg edited this page Apr 20, 2022 
        ·
        1 revision
      
    - 
Add this to your gradle.properties file: kotlin.native.jvmArgs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006 
- 
Create a Remote Run Configuration and add: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006 
to the "Command line arguments for remote JVM"
   
- Run build and wait till the server started ./gradlew build
   
- Now select your remote run configuration and start it in debug mode. The debugger should now stop at your breakpoints.
- Create a Remote Run Configuration and add: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 to the "Command line arguments for remote JVM"
   
- Run build with the following arguments ./gradlew build --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"
- Now select your remote run configuration and start it in debug mode. The debugger should now stop at your breakpoints.