user2512057
user2512057

Reputation: 51

Attach debugger (using eclipse) to play framework failed

I am using Scala to write a web on top of Play framework with eclipse IDE. I am trying to debug my app but hit debug attach failure. I tried to switch using Java instead of Scala,but I got same error. This is what I do.

  1. Create a project and run play clean compile
  2. run play debug run
  3. in Eclipse, set 'debug configration' ->remote java application -> host: localhost, port:9999 and common: debug
  4. in browser type in URL and enter: localhost:9999. Then get the following failure in play framework command line: Debugger failed to attach: handshake failed - received >GET / HTTP/1.1< - expected >JDWP-Handshake<

Any idea what is wrong?

Upvotes: 3

Views: 12560

Answers (1)

estmatic
estmatic

Reputation: 3449

localhost:9999 is what Eclipse is going to use to communicate with your application. On your browser, you still access your application on localhost:9000 (default) or however you would access your application had you just done play run.

Basically, you've configured your debugging correctly in Eclipse.

  1. Now, with your configuration selected from the Debug Configuration, click Debug (or selected your configuration from the Debug As toolbar button). Eclipse will attach to localhost:9999.
  2. Browse to localhost:9000 like you normally would to access your application.
  3. That's it. Eclipse will pause on any breakpoints you have set, etc.

Upvotes: 10

Related Questions