Skip to main content

_debug-configuration

Configuration#

The development environment is different between developers. You should configure remote debug configurations according to the actual situation.

Sample Configuration#

Nocalhost Configs
name: java-remote-debugging
serviceType: deployment
containers:
- name: ""
dev:
...
command:
debug:
- ./debug.sh
debug:
remoteDebugPort: 5005
...

Maven Example#

The shell command for Maven example:

jdk >= 1.8 and springBoot >=2.2.1.RELEASE
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

For jdk <=1.7 you should replace -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 with -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

For lower version of the springBoot you should replace -Drun.jvmArguments with -Dspring-boot.run.jvmArguments

Gradle Example#

The startup command for Gradle example:

Gradle's debug.sh
./gradlew bootRun --debug-jvm --no-daemon
Last updated on by Tank Xu