Alex Klibisz

Configuring Play Framework 2.3.6 for debugging in Intellij14

Alex Klibisz, 11/27/2014

I had some trouble figuring out how to set up the most recent Play Framework build to allow debugging in IntelliJ 14 (Community edition). This is on Ubuntu Desktop 14.

Here's what I do to debug my Play Framework Java code through IntelliJ 14:

  1. In a terminal window, cd to your project directory and type activator idea. This will execute some commands to setup your project for IntelliJ.
  2. In IntelliJ, click Open, select your project directory, and click OK.
  3. In IntelliJ, click Run, Edit Configurations. Click the green plus, and create a new Remote. The only things you have to change are the Name, to whatever you want, the Port to 9999, and Search sources using module’s classpath to your project. Click Apply and OK.
  4. From the terminal, type activator -jvm-debug 9999 run
  5. Return to IntelliJ, click Run, Debug.
  6. You can now still access your web application at localhost port 9000, and it will halt at any breakpoints you set in IntelliJ.

This thread on StackOverflow may be helpful as well.

Related Posts