zoukankan      html  css  js  c++  java
  • Play Framework介绍3使用Eclipse开发和调试

    转换成Eclipse项目

    1. 启动命令行,输入play new <项目名>,Play会在当前路径下创建项目。
    2. 输入play eclipsify <项目名>,Play会在项目目录中创建eclipse需要的配置文件,将其转换成eclipse项目。
    3. 在eclipse中导入创建的项目。

    image

     

    调试

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

    1. JPDA:连接到已经启动的Play Server,实现alive调试
    2. helloworld:本地运行
    3. Test:测试

    选中它们,右键执行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本身。

  • 相关阅读:
    Linux进程间通信(IPC)
    mq_setattr
    mq_getattr
    mq_unlink
    mq_receive
    mq_send
    mq_close
    POSIX消息队列
    mq_open
    C语言关键字
  • 原文地址:https://www.cnblogs.com/Chaos/p/2018444.html
Copyright © 2011-2022 走看看