Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
关于如何让Intellij Scala插件在断点处停止的提示_Scala_Intellij Idea_Breakpoints - Fatal编程技术网

关于如何让Intellij Scala插件在断点处停止的提示

关于如何让Intellij Scala插件在断点处停止的提示,scala,intellij-idea,breakpoints,Scala,Intellij Idea,Breakpoints,下面微小的scala脚本的屏幕截图显示了设置的四个断点 object WC { val code = """import org.apache.hadoop.conf.Configuration // This class performs the map operation, translating raw input into the key-value class TokenizerMapper extends Mapper[Object,Text,Text,IntWritable]

下面微小的scala脚本的屏幕截图显示了设置的四个断点

object WC {
  val code = """import org.apache.hadoop.conf.Configuration
// This class performs the map operation, translating raw input into the key-value
class TokenizerMapper extends Mapper[Object,Text,Text,IntWritable] {
"""

  def sloc(str: String): Int = {
    val x: List[String] = str.split("\\n").map(_.trim).toList.filter { line =>
      line.length!=0 && !line.startsWith("import ") && !line.startsWith("/*")  && !line.startsWith("//") && !line.equals("{") && !line.equals("}") }
    println(x.mkString("\n"))
    x.size
  }
}

 println (WC.sloc(WC.code))
以下是特点:

  • 实际上,只有“println(WC.sloc(WC.code))”上的最后一个断点才得到尊重。其他的都被忽略了
  • 但是,我可以在调试器中单步执行其他三行
我想知道其他人是否发现了如何让scala调试器尊重断点的“模式”。好的,我们知道scala插件是有缺陷的——这是一个试图“最大限度地”利用我们所拥有的东西的问题


我正在使用最新的IJ ULtimate 12.1.6。

为了使调试器能够正常工作,IJ需要一个可用的类,而不仅仅是对象。这可能在第13条中得到了修正