There's no eclipse folder in project folder after 'play eclipsify'. How to debug this project use eclipse with JPDA?
Debug Playframework 2.0 in Eclipse
Asked Answered
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. –
Outmost
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 –
O
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
Can you please be more specific? –
Embroil
run your play project in command line with "play debug run". If that run correctly, you could access the "127.0.0.1:9000" in browser. After that, create a debug configuration in eclipse with right click your project-debug as-debug configurations-"double click"Remote Java Application-change host and port to localhost and 9999(make sure you select the right project). Then click debug to start debugging and place breakpoints as you wish. –
O
not working on windows. play debug run can start app on port 9000. VM connection timeout when try to connect debug as . –
Twum
try to change debug host from 127.0.0.1 to localhost? –
O
Exactly as fxp has said, in play 2.2.x you should do the following:
- Type in the play console play debug run
- In eclipse, right click over your project and go to Debug As, and then click on Debug configurations..
- In Debug configurations screen, go and click to Remote Java Application.
- 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
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.
The socket port for debugging is 9999 in play 2.0
Also can be set with "set JPDA_PORT=xxxx" if you want to set up multiple JPDA port on one machine –
O
Another thing, you might need to create a unit test in Play to get the debug running.
© 2022 - 2024 — McMap. All rights reserved.