设置环境变量

unix,linux
      export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n”
windows   
      set GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n”

启动服务

gradle task --no-daemon -Dorg.gradle.debug=true

使用eclispe的远程调试进行调试 Debug Configurations -> Remote Java Application

gradle使用eclipse debug 代码-LMLPHP

04-27 04:54