From 5fbe5d412025d2b0133cbb49d440926e6a38834d Mon Sep 17 00:00:00 2001 From: Tadaya Tsuyukubo Date: Fri, 20 Jun 2014 11:16:31 -0700 Subject: [PATCH] Add how-to remote debug from Gradle Add a section to the reference documentation "how-to" about remote debugging a Gradle started app. Fixes gh-1129 --- spring-boot-docs/src/main/asciidoc/howto.adoc | 28 +++++++++++++++++++ spring-boot-docs/src/main/asciidoc/index.adoc | 1 + 2 files changed, 29 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 6dc4d16f52..206e95c30c 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1589,6 +1589,34 @@ Check {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for +[[howto-remote-debug-gradle-run]] +=== 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 `applicationDefaultJvmArgs` in `build.gradle` or `--debug-jvm` command line option. + +`build.gradle`: + +[source,groovy,indent=0,subs="verbatim,attributes"] +---- + applicationDefaultJvmArgs = [ + "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" + ] +---- + + +Command line: + +[indent=0] +---- + $ gradle run --debug-jvm +---- + + +Check {gradle-userguide}/application_plugin.html[Gradle Application Plugin] for more +details. + + + [[howto-build-an-executable-archive-with-ant]] === Build an executable archive with Ant To build with Ant you need to grab dependencies, compile and then create a jar or war diff --git a/spring-boot-docs/src/main/asciidoc/index.adoc b/spring-boot-docs/src/main/asciidoc/index.adoc index 32b38df0dc..84b81e2390 100644 --- a/spring-boot-docs/src/main/asciidoc/index.adoc +++ b/spring-boot-docs/src/main/asciidoc/index.adoc @@ -33,6 +33,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; :spring-data-javadoc: http://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa :spring-data-commons-javadoc: http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data :spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb +:gradle-userguide: http://www.gradle.org/docs/current/userguide // ====================================================================================== include::documentation-overview.adoc[]