新建play项目eclipsify后导入eclipse后无法debug调试

时间:2023-03-09 01:15:53
新建play项目eclipsify后导入eclipse后无法debug调试

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,即可成功启动调试。