在 Eclipse 中调试 Playframework 2.0
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9778849/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Debug Playframework 2.0 in Eclipse
提问by fxp
There's no eclipse folder in project folder after 'play eclipsify'. How to debug this project use eclipse with JPDA?
'play eclipsify'后项目文件夹中没有eclipse文件夹。如何使用 eclipse 和 JPDA 调试这个项目?
回答by fxp
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
从 play 2.0 开始,调试项目只需要在控制台“play debug run”中运行项目,并使用端口 9999 创建远程 Java 应用程序的新调试配置
回答by Gere
Exactly as fxp has said, in play 2.2.x you should do the following:
正如 fxp 所说,在 play 2.2.x 中,您应该执行以下操作:
- 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 (*)
- 输入 play console play debug run
- 在 Eclipse 中,右键单击您的项目并转到调试为,然后单击调试配置..
- 在调试配置屏幕中,转到并单击远程 Java 应用程序。
- 在端口输入文本中输入 9999 (*)
(*): when you execute play debug run, look the print information for the port number. Probably the first message will be
(*): 当你执行 play debug run 时,查看端口号的打印信息。第一条消息可能是
Listening for transport dt_socket at address: 9999
侦听地址为 9999 的传输 dt_socket
回答by Foo L
In Play 2.3.x, you need to start the application with:
在 Play 2.3.x 中,您需要使用以下命令启动应用程序:
activator -jvm-debug 9999 run
activator -jvm-debug 9999 run
Then follow all the other steps in the other answers.
然后按照其他答案中的所有其他步骤进行操作。
回答by user1129084
Another thing, you might need to create a unit test in Play to get the debug running.
另一件事,您可能需要在 Play 中创建一个单元测试来运行调试。
回答by jparkcool
The socket port for debugging is 9999 in play 2.0
play 2.0中调试用的socket端口为9999