80.9 Remote debug a Spring Boot application started with Gradle
To attach a remote debugger to a Spring Boot application started with Gradle you can use the jvmArgs property of bootRun task or --debug-jvm command line option.
build.gradle:
bootRun {
jvmArgs "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
}
Command line:
$ gradle bootRun --debug-jvm
Check Gradle Application Plugin for more details.