How to run the Dropwizard app in debug mode using Eclipse?

I want to run the Dropwizard 0.8.5 application in debug mode, in which:

  • The application runs locally using JPDA; and
  • In my IDE (Eclipse), I set breakpoints and use the JPDA client to connect to my locally running application (I think it is)

For server debug mode:

Typically, my DW application starts from the command line as follows:

java -jar build/libs/myapp.jar server src/test/resources/myapp-local.yml 

So, what command line arguments trigger this mode in debug mode (JPDA), or what are the changes to myapp-local.yml needed to do this?


For Eclipse / JPDA Client

I assume that I just set breakpoints and then create a new Debug Configuration inside Eclipse, but not sure which arguments / configs should set this configuration. Any ideas?

+8
java classpath dropwizard
source share
1 answer

Just run the main class (the one that extends Application<T> ) in debug mode. You will need to set the program parameters as "server src/test/resources/myapp-local.yml" in your startup configurations.

+10
source share

All Articles