Skip to content

Commit 0768402

Browse files
author
Phillip Webb
committed
Merge pull request #1129 from ttddyy/document-remote-debug-gradle
* document-remote-debug-gradle: Add how-to remote debug from Gradle
2 parents dbfd785 + 5fbe5d4 commit 0768402

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,34 @@ Check {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for
15891589

15901590

15911591

1592+
[[howto-remote-debug-gradle-run]]
1593+
=== Remote debug a Spring Boot application started with Gradle
1594+
To attach a remote debugger to a Spring Boot application started with Gradle you can use
1595+
the `applicationDefaultJvmArgs` in `build.gradle` or `--debug-jvm` command line option.
1596+
1597+
`build.gradle`:
1598+
1599+
[source,groovy,indent=0,subs="verbatim,attributes"]
1600+
----
1601+
applicationDefaultJvmArgs = [
1602+
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
1603+
]
1604+
----
1605+
1606+
1607+
Command line:
1608+
1609+
[indent=0]
1610+
----
1611+
$ gradle run --debug-jvm
1612+
----
1613+
1614+
1615+
Check {gradle-userguide}/application_plugin.html[Gradle Application Plugin] for more
1616+
details.
1617+
1618+
1619+
15921620
[[howto-build-an-executable-archive-with-ant]]
15931621
=== Build an executable archive with Ant
15941622
To build with Ant you need to grab dependencies, compile and then create a jar or war

spring-boot-docs/src/main/asciidoc/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
3333
:spring-data-javadoc: http://docs.spring.io/spring-data/jpa/docs/current/api/org/springframework/data/jpa
3434
:spring-data-commons-javadoc: http://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data
3535
:spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
36+
:gradle-userguide: http://www.gradle.org/docs/current/userguide
3637
// ======================================================================================
3738

3839
include::documentation-overview.adoc[]

0 commit comments

Comments
 (0)