命令行到Project ,输入:
GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
./gradlew 你的task --no-daemon -Dorg.gradle.debug=true插件源码打上断点
Eidt Configurations
➜+
➜remote
➜ok
点击
debug
,开始调试
参考:
https://github.com/robolectric/robolectric-gradle-plugin/wiki/Debugging-the-Plugin