Skip to content

Instantly share code, notes, and snippets.

@jackmahoney
Created March 19, 2015 14:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jackmahoney/6607f7644b80b4b9fab4 to your computer and use it in GitHub Desktop.
Save jackmahoney/6607f7644b80b4b9fab4 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