I'm trying to debug my unit tests with Eclipse (Kepler), in a Play! project. I launched play debug . In Eclipse, I created a Remote Java Application in Debug Configurations with the port supplied by the output of the command line. Clicked Apply, then Debug, added breakpoints. In the command prompt of my Play project, I launched test . Eclipse never stops at the breakpoints. It's very annoying. I'm on Windows 7 Pro 64bits.
Thanks for your help
Add:
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
Keys.fork in (Test) := false
)
in your Build.scala as explained here
With command line in your Play! project:
I just test it in Keppler, works fine for me ;)
Building on @Pierre-Yves' suggestion (I'm new to Play 2.2 and SBT, so this may be avoidable), to debug individual unit tests via IntelliJ I needed the following in build.sbt (thanks to Mike Slinn ):
Keys.fork in Test := false
parallelExecution in Test := false
Without the build.sbt changes, executing the following in the Play debug console (each session) worked:
$ set sbt.Keys.fork in Test := false
After either of those solutions, I could then set breakpoints and remote debug individual test classes via:
$ test-only *package.class*
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.