I'm using Ensime for an sbt
project. When I run ensime-db-start
in a unit test under src/test/scala/<pkg>.../Myclass.scala
I cannot set a breakpoint and then I immediately get a ClassNotFoundException
:
VM Started:
Exception occurred: java.lang.ClassNotFoundException (uncaught)"thread=main", java.net.URLClassLoader$1.run(), line=202 bci=73
Issuing classpath
afte开发者_StackOverflowr this error shows that the class is in the classpath.
On a related note I also cannot set a breakpoint before issuing the run command using the C-c C-d b sequence. I get
could not find class information for given permission
Perhaps I'm not understanding how Ensime is launching the JVM - any pointers appreciated.
I can run unit test fine from within sbt
and I can run a class fine from under src/main/scala/...
I am using ensime
0.10.1 and jdk
1.6.0_26.
import sbt._
import Keys._
object BuildSettings {
val buildOrganization = "bmf"
val buildVersion = "1.0.0"
// val buildScalaVersion = "2.9.0-1"
val buildSettings = Defaults.defaultSettings ++ Seq (
organization := buildOrganization,
version := buildVersion
)
}
object MyBuild extends Build
{
import BuildSettings._
val junitdep = "junit" % "junit" % "4.8" % "test"
val scalatestdep = "org.scalatest" % "scalatest" % "1.3" % "test"
val commonDeps = Seq(junitdep, scalatestdep)
javacOptions += "-g"
lazy val common = Project (
"main",
file ("."),
settings = buildSettings ++ Seq (libraryDependencies ++= commonDeps)
)
}
精彩评论