how do you debug java annotation processors using intellij?

后端 未结 8 973
春和景丽
春和景丽 2020-12-07 13:47

How do you debug java annotation processors using intellij?

Preferably using IDEA IntelliJ. I tried setting a breakpoint inside the processor and running but it did

8条回答
  •  误落风尘
    2020-12-07 14:13

    Follow these steps, These worked for me on android studio for gradle project:-

    1).In gradle.properties add following lines

    org.gradle.daemon=true
    org.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
    

    2).Edit Build COnfiguration and add Remote Configration

    3).Run recently created run configuration APT.

    4).Add break point in annotation processing code and build overall project

提交回复
热议问题