Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Dropwizard app in debug mode with Eclipse?

I'm looking to run my Dropwizard 0.8.5 app in debug mode whereby:

  • The app is running locally, using JPDA; and
  • In my IDE (Eclipse) I set breakpoints and use a JPDA client to connect to my locally running app (I think this is how it goes)

For the server debug mode:

Typically my DW app runs from the command-line like so:

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

So what are the command-line args to get this running in debug mode (JPDA), or what are the modifications to myapp-local.yml needed to accomplish this?


For Eclipse/JPDA Client

I assume I just set breakpoints and then create a new Debug Configuration inside Eclipse, but not sure what arguments/configs to set this Configuration up with. Any ideas?

like image 790
smeeb Avatar asked Nov 14 '15 23:11

smeeb


1 Answers

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 run configurations.

like image 120
dkulkarni Avatar answered Oct 12 '22 17:10

dkulkarni