日期:2014-05-20 浏览次数:20824 次
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本身。