Skip to content

Instantly share code, notes, and snippets.

@JerryPreissler
Last active December 18, 2015 14:18
Show Gist options
  • Save JerryPreissler/5795934 to your computer and use it in GitHub Desktop.
Save JerryPreissler/5795934 to your computer and use it in GitHub Desktop.
Configure remote debugging when running application (e.g. Jetty) via Maven plugin
Set the maven opts via an environment variable (sample is for bash, adapt as needed):
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
Start the application, e.g. via
mvn jetty:run
The application should wait for a debug connection with the following message:
Listening for transport dt_socket at address: 8000
Attach you debug process. In Eclipse, you can do this via
Run -> Debug Configurations -> Remote Java Applications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment