How to debug a Gradle build.gradle file (in a debugger, with breakpoints)?

后端 未结 5 867
攒了一身酷
攒了一身酷 2020-12-12 13:01

Is there a tool that will allow me to set breakpoints in a build.gradle file and step through tasks in a debugger?

Note: I believe that I\'m asking a different ques

5条回答
  •  无人及你
    2020-12-12 13:39

    export GRADLE_OPTS does not work for me.

    Try this:

    1 Add remote debug config

    2 add breakpoint in gradle

    3 ./gradlew your task --stacktrace -Dorg.gradle.daemon=false -Dorg.gradle.debug=true

    4 Attach debug in studio

    Then the breakpoint stops !!

提交回复
热议问题