Play Framework介紹3--使用Eclipse開發和調試
轉換成Eclipse項目
- 啟動命令行,輸入play new <項目名>,Play會在當前路徑下創建項目。
- 輸入play eclipsify <項目名>,Play會在項目目錄中創建eclipse需要的配置文件,將其轉換成eclipse項目。
- 在eclipse中導入創建的項目。
調試
Play轉換eclipse項目時,在eclipse目錄中生成了三個啟動配置:
- JPDA:連接到已經啟動的Play Server,實現alive調試
- helloworld:本地運行
- 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,找到
posted on 2011-04-18 21:18 chaos 閱讀(818) 評論(0) 編輯 收藏 所屬分類: Play Framework