设置环境变量
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