Bannatyne84
Bannatyne84

Reputation: 156

Debugging simple Dropwizard application in Eclipse

I am trying to debug a simple DropWizard application in Eclipse, in an attempt to familiarise myself with it. I can start the jvm from the command line like this:

java -Xdebug -agentlib:jdwp=transport=dt_socket,address=9999,server=y,suspend=n -jar dropwizard-0.0.1-SNAPSHOT.jar server config.yaml

And then connect to it as a remote java app.

Or I can find the application class (containing the main method) in eclipse and launch the application in debug that way. Both these methods appear to successfully start the application in debug, and sure enough, if I set a break point somewhere, it gets hit.

My problem, however, is that Eclipse would normally at this point give me some control over the application but in this case is rather oddly not allowing me to resume, or use any step commands. I can't do anything other than terminate the application.

Perhaps I am having a stupid morning, but I cannot fathom why this is happening. Can anyone shed any light on this and how I can gain the control required to debug?

Upvotes: 2

Views: 1379

Answers (1)

Bannatyne84
Bannatyne84

Reputation: 156

I cannot be certain, but I believe this may have been due to an unintended mix of 32bit and 64bit components.

I had the same problem with a project I was much more familiar with a few days later, and in that case it was resolved by changing the buildpath to use the 64bit JDK. I was previously deploying it to a 64bit tomcat with the 32bit jdk on the build path when this happened.

Clearly the situation is a little different with dropwizard as its deployment is self-contained, but similarly altering the build path there seemed to resolve this for me.

Upvotes: 1

Related Questions