Question

At first I had difficulty attaching a debugger to FakeApplication instances created by my unit tests. Now I can see threads starting when my tests run, but breakpoints I set within Scala IDE in the test and in the tested code are ineffectual.

Is running two instances of Play and enabling jdwp in Test the usual way to debug unit tests?

No correct solution

OTHER TIPS

play runs the tests on a forked JVM by default, could this be the reason for your problems maybe? You can disable this in your project/Build.scala adding the setting Keys.fork in (Test) := false and then starting play with debug and attaching.

It looks something like this:

val main = play.Project(appName, appVersion, dependencies).settings(
  Keys.fork in (Test) := false
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top