欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

Play Framework介绍:使用Eclipse开发和调试

来源: javaer 分享于  点击 21523 次 点评:245

Play Framework介绍:使用Eclipse开发和调试


转换成Eclipse项目

image

调  试

Play转换eclipse项目时,在eclipse目录中生成了三个启动配置:

选中它们,右键执行Run As,即可完成相应的任务。

本地调试

直接Debug As 执行helloworld会报错:

Error occurred during initialization of VM
agent library failed to init: jdwp
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.

需要:

打开helloworld.launch,找到

<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dplay.debug=yes -Dplay.id= -Dapplication.path  …/>

将-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n 去掉。

然后Debug As,即可成功启动调试。附加Play源码后,即可调试Play本身。

相关栏目:

用户点评