使用Eclipse与Play Framework 2.0 [英] Using Eclipse with Play Framework 2.0
问题描述
在Play 2.0中,似乎没有任何类似的东西。有没有办法控制您的启动和使用Eclipse调试Play 2.0?
类似的问题:在Eclipse中调试Playframework 2.0
该问题的答案没有足够的具体
问题1:
删除之后,打开Eclipse并选择 File - >导入... - >现有项目进入工作区
。将打开一个对话框,选择您的Play Framework 2.0项目文件夹,然后单击完成
。
问题2:
-
使用
播放调试运行
启动Play Framework应用程序。你会看到这样的东西:
在地址:9999
... 收听运输dt_socket -
在Eclipse中,右键单击
Project Explorer
中的项目,然后选择调试为 - >调试配置...
。 -
将打开一个名为
调试配置
的新对话框。双击远程Java应用程序
,右侧将显示一个新窗口。更改连接属性
,以便指向主机localhost
和端口9999
。通过点击Debug
按钮进行确认。 -
在Eclipse中的应用程序中放置一个断点。
-
在网络浏览器中正常尝试您的应用程序。如果它是一个断点,那么Eclipse将被带到最前面,让你调试。
I am new to Framework 2.0. In Play 1.0, after you Eclipsify your project, you have have a *.launch file that you can use to launch your project.
After you eclipsify in Play 2.0, you don't seem to have anything similar. Is there a way to control your launching and to debug Play 2.0, using Eclipse?
A similar question: Debug Playframework 2.0 in Eclipse
The answer to that question did not have specific enough instructions for me to know how to follow.
Question 1:
After you have eclipsified, open Eclipse and choose File -> Import... -> Existing Projects into Workspace
. A dialog will open, choose your Play Framework 2.0 project folder and click Finish
.
Question 2:
Start your Play Framework application using
play debug run
. You will see something like this:Listening for transport dt_socket at address: 9999 ...
In Eclipse, right-click on your project in
Project Explorer
and chooseDebug As -> Debug Configurations...
.A new dialog called
Debug Configurations
will open. Double-click onRemote Java Application
and a new window will appear on the right side. Change theConnection properties
so that the point to hostlocalhost
and port9999
. Confirm by clicking theDebug
button.Put a breakpoint in your Application in Eclipse.
Try your application as normal in a web-browser. If it hits a breakpoint then Eclipse will be brought as frontmost and let you debug.
这篇关于使用Eclipse与Play Framework 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!