来源:http://stackoverflow.com/questions/5390178/how-to-make-the-debugging-in-playframework-in-intellij-idea
Since version 11 of IDEA, there is native support for the Play framework. To debug your Play application do the following:
- from the command-line, create a new demo app using 'play new demoapp'
- from the command-line, create Intellij project/module files using 'play idea demoapp'
- optionally edit .iml file and change '1.6' by '1.7' if you use the latest JDK (bug!)
- start Intellij, and open the demoapp project
- Go to Run/Edit Configuration
- Press the '+' button, and add a 'remote' configuration
- Choose Transport:socket, Debugger mode:Attach, Host:localhost, Port 8000
- Set the 'name' and the 'classpath-module'
- Start the Play! framework support in IDEA by choosing Tools/Play framework
- Start the demo application by typing 'play run play101' in the Play! console
- Set a breakpoint in the Application.java file on the 'render()' line
- Start the 'remote' debug configuration.
- In a browser, go to http://localhost:9000