How to run Play Framework 2.x in debug mode in IntelliJ IDEA?

Bahri Gökcan picture Bahri Gökcan · Jun 14, 2014 · Viewed 20.8k times · Source

I want to run Play Framework 2.x in debug mode in IntelliJ IDEA. I searched in the Internet and all results say that you have to use play console.

Is it possible to run in debug mode in IntelliJ IDEA without using play console?

Answer

ARM picture ARM · Jun 15, 2014

Using activator :

  1. From Terminal (Not intellij terminal), enter command : activator ui
  2. Open your existing app
  3. Choose "Code view & Open in IDE
  4. In Browse Code, click setting icon
  5. Choose Open Project in Intellij IDEA
  6. Generate

  7. Open Intellij IDEA

  8. Open project - browse your app directory
  9. Run - Edit Configuration
  10. Add new configuration - Remote
  11. Add name Setting transport : socket, debugger mode : attach, Host : localhost, port : 9999 module clashpath : your app
  12. Tools - Open Terminal
  13. activator -jvm-debug 9999 run
  14. Run debug
  15. Open browser localhost:9000