2
votes

I know my problem sounds very familiar. But I can't debug my Play! project via Eclipse. I read some tutorials but nothing helped me.

Precondition:

  1. use Windows 8 with Eclipse Juno and Play 2.1
  2. check that port 9999 is not in use
  3. create a play project and "eclipsify" it

Workflow:

1. start play with "play debug run"
- http listening port = 9000 and jpda = 9999
2. setup debug config: Java Remote Application; Socket Attach; host = locahost; port = 9999
3. debug project

--> Error: Failed to connect to remote VM. Connection refused. Connection refused: connect

I also tried to run eclipse as admin with the same result. I heard it is possible to change the jdpa port but I doesn't make sense cause 9999 is free. Also I would like to know how can I start debug mode inside the play console? I only can start debugging via "play debug run"

Thanks a lot

G.

Almost identical problem: Debug Playframework 2.0 in Eclipse

4

4 Answers

0
votes

Check up your firewall events after blocked events... I had similar problems with Eclipse+GWT+jpda Debugging, My Comodo Internet Security Suite has blocked

0
votes

Sounds a bit silly, but assure that you aren't debugging already. Having the same configuration as you, my experience was the same, until I opened the Eclipse Debug Perspective and realized there was an open connection. To force Eclipse to open this perspective, put a breakpoint in the index view controller and refresh the page without using the cache (SHIFT + F5 in Google Chrome).

Hope it helps you.

0
votes

You should first do

play debug run

and then, if this starts as expected and says

Listening for transport dt_socket at address: 9999

attach in eclipse to the running debug session with Scala debugger (Socket Attach) and port 9999

0
votes

This sounds silly, but make sure you are visiting the url in your browser that will cause your controller action to be hit in eclipse after doing the following:

  1. ensuring no other instances of java are running
  2. In a cmd line, go to your play proj dir and type "play debug run"
  3. You should see "listening for transport dt_socket at address: 9999" and "listening for http on...."
  4. In eclipse, right click your project and select debug-->debug configurations. Connection type is "Standard(Socket Attach)" and port is "9999".