Setting-up your preferred IDE Working with Play is easy. You don’t even need a sophisticated IDE, because Play compiles and refreshes the modifications you make to your source files automatically, so you can easily work using a simple text editor. However, using a modern Java or Scala IDE provides cool productivity features like auto-completion, on-the-fly compilation, assisted refactoring and debugging. EclipseGenerate configurationPlay provides a command to simplify Eclipse configuration. To transform a Play application into a working Eclipse project, use the [My first application] $ eclipsify You then need to import the application into your Workspace with the File/Import/General/Existing project… menu (compile your project first). You can also start your application with
If you make any important changes to your application, such as changing the classpath, use
The generated configuration files contain absolute references to your framework installation. These are specific to your own installation. When you work in a team, each developer must keep his Eclipse configuration files private. IntelliJGenerate configurationPlay provides a command to simplify Intellij IDEA configuration. To transform a Play application into a working IDEA module, use the idea command: [My first application] $ idea You then need to import the application into your project (File->New Module->Import existing Module)
To debug, first add a debug configuration
Start play in debug mode: $ play debug which should print: Listening for transport dt_socket at address: 9999 Set some breakpoints. Run the web app by executing the task If you make any important changes to your application, such as changing the classpath, use |
02.快速入門 >