How to debug play framework 2.1.0 scala tests in intellij

蓝咒 提交于 2019-12-04 08:02:47

By default, SBT is forking a new process to execute tests. Your IDE is connected to the SBT main process but not to the "forked" one, that's why debugging doesn't work.

You can override this by defining the following setting in your Build.scala file :

val main = play.Project(appName, appVersion, appDependencies).settings(
  sbt.Keys.fork in Test := false
)

Now, the main process will be used to execute the tests (when executing test from the play console) and your IDE should be able to correctly debug them.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!