commit
976152b244
|
|
@ -40,7 +40,7 @@ Doing so lets you attach a debugger to your packaged application, as shown in th
|
||||||
|
|
||||||
[source,shell,indent=0,subs="verbatim"]
|
[source,shell,indent=0,subs="verbatim"]
|
||||||
----
|
----
|
||||||
$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \
|
$ java -agentlib:jdwp=server=y,transport=dt_socket,address=8000,suspend=n \
|
||||||
-jar target/myapplication-0.0.1-SNAPSHOT.jar
|
-jar target/myapplication-0.0.1-SNAPSHOT.jar
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,11 @@ The following configuration suspend the process until a debugger has joined on p
|
||||||
include::../maven/running/debug-pom.xml[tags=debug]
|
include::../maven/running/debug-pom.xml[tags=debug]
|
||||||
----
|
----
|
||||||
|
|
||||||
These arguments can be specified on the command line as well, make sure to wrap that properly, that is:
|
These arguments can be specified on the command line as well:
|
||||||
|
|
||||||
[indent=0]
|
[indent=0]
|
||||||
----
|
----
|
||||||
$ mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
|
$ mvn spring-boot:run -Dspring-boot.run.jvmArguments=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<jvmArguments>
|
<jvmArguments>
|
||||||
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
|
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005
|
||||||
</jvmArguments>
|
</jvmArguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
||||||
|
|
@ -63,11 +63,10 @@ class RunArgumentsTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void parseDebugFlags() {
|
void parseDebugFlag() {
|
||||||
String[] args = parseArgs("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005");
|
String[] args = parseArgs("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005");
|
||||||
assertThat(args).hasSize(2);
|
assertThat(args).hasSize(1);
|
||||||
assertThat(args[0]).isEqualTo("-Xdebug");
|
assertThat(args[0]).isEqualTo("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005");
|
||||||
assertThat(args[1]).isEqualTo("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue