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?

没有正确的解决方案

其他提示

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
)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top