11
votes

There's no eclipse folder in project folder after 'play eclipsify'. How to debug this project use eclipse with JPDA?

5
Have you tried refreshing your project in Eclipse (right-click on the project and then just click on the refresh menu)? Sorry, I have never tried it but it looks like it may just be it. - Guillaume Polet
Yes, but the problem is that I don't know how to connect to JPDA in eclipse to connect to the server. In 1.24 playframework, there is a debug launcher file in the project after "eclipsify".Thanks anyway - fxp

5 Answers

25
votes

Since play 2.0, only thing need to do to debug a project is run project in console 'play debug run' and create a new debug conf of remote java application with port 9999

13
votes

Exactly as fxp has said, in play 2.2.x you should do the following:

  1. Type in the play console play debug run
  2. In eclipse, right click over your project and go to Debug As, and then click on Debug configurations..
  3. In Debug configurations screen, go and click to Remote Java Application.
  4. Put 9999 in the port input text (*)

(*): when you execute play debug run, look the print information for the port number. Probably the first message will be

Listening for transport dt_socket at address: 9999

3
votes

In Play 2.3.x, you need to start the application with:

activator -jvm-debug 9999 run

Then follow all the other steps in the other answers.

Setting up your preferred IDE

0
votes

The socket port for debugging is 9999 in play 2.0

0
votes

Another thing, you might need to create a unit test in Play to get the debug running.