Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mkurz/76ab55e28d21581b47548447ec4069a7 to your computer and use it in GitHub Desktop.
Save mkurz/76ab55e28d21581b47548447ec4069a7 to your computer and use it in GitHub Desktop.
Debug Play Framework 2.x unit test in IntelliJ

In build.sbt add the following lines:

Keys.fork in Test := false
parallelExecution in Test := false
  • Start the play console in debug mode $ play debug.
  • Create a RemoteDebug run configuration in IntelliJ. This is only a debugger, not a compiler.
  • Run this configuration listening on port 9999.
  • Add a breakpoint to your test.
  • In the console run your test > test-only core.services.helpers.ServiceHelperTest.
  • Watch IntelliJ break on breakpoint.
  • Profit $$$.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment