Skip to content

Instantly share code, notes, and snippets.

@jonashackt
Last active December 1, 2021 01:45
Show Gist options
  • Save jonashackt/c1fd6fabdb014be9c4b935798454e17a to your computer and use it in GitHub Desktop.
Save jonashackt/c1fd6fabdb014be9c4b935798454e17a to your computer and use it in GitHub Desktop.
Remote debugging Spring Boot
### java -jar
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar
### Maven
Debug Spring Boot app with Maven:
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8001"
On bash:
export MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"
(or on Windows: set MAVEN_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y")
mvn clean install
In Eclipse:
New Remote debugging app to port 8000 on localhost
@daveyx
Copy link

daveyx commented Jul 19, 2018

thx!

@lpigna
Copy link

lpigna commented Aug 11, 2018

thank you!!!

@felix19350
Copy link

Thanks!

@lsantamaria
Copy link

Thanks!

@sergionet17
Copy link

thanks

@f0r3v3ran00b
Copy link

Thanks a lot! Is there something similar for when using Gradle?

@roadcoder
Copy link

Thanks, but it the webservices I was trying to deploy in my jar didn't work for me until I changed the command slightly: suspend=n instead of suspend=y

@backtozero
Copy link

backtozero commented Sep 18, 2019

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n,quiet=n

To enable stdout

@ndgo
Copy link

ndgo commented Dec 18, 2019

thank you

@bahcetepe
Copy link

thank you.

@mengqi1984
Copy link

thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment