Debug gradle task

  • Configure Remote debugging in Ideasocket

    Configure Remote debugging in Idea

    Configure Remote debugging in Idea

  • set GRADLE_OPTS environment variablegradle

export GRADLE_OPTS ="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

suspend表明是否要在斷點處暫停,默認爲 n,須要改成 y 才能夠debugdebug

  • run gradle task
./gradlew someTask -Dorg.gradle.debug=true --no-daemon
  • attach debuggercode

    輸入圖片說明

相關文章
相關標籤/搜索