From 091679e38741bdbd78c5fada3fab56a24830a05c Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Tue, 14 Apr 2015 00:39:21 +0800 Subject: [PATCH] Create 72.7. Remote debug a Spring Boot application started with Gradle.md --- ...g a Spring Boot application started with Gradle.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 IX. ‘How-to’ guides/72.7. Remote debug a Spring Boot application started with Gradle.md diff --git a/IX. ‘How-to’ guides/72.7. Remote debug a Spring Boot application started with Gradle.md b/IX. ‘How-to’ guides/72.7. Remote debug a Spring Boot application started with Gradle.md new file mode 100644 index 0000000..17d8bf9 --- /dev/null +++ b/IX. ‘How-to’ guides/72.7. Remote debug a Spring Boot application started with Gradle.md @@ -0,0 +1,15 @@ +### 72.7. 远程调试一个使用Gradle启动的Spring Boot项目 + +想要为使用Gradle启动的Spring Boot应用添加一个远程调试器,你可以使用build.gradle的applicationDefaultJvmArgs属性或`--debug-jvm`命令行选项。 + +build.gradle: +```gradle +applicationDefaultJvmArgs = [ + "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" +] +``` +命令行: +```shell +$ gradle run --debug-jvm +``` +详情查看[Gradle应用插件](http://www.gradle.org/docs/current/userguide/application_plugin.html)。