0

In my file file.scala, I have the following line:

  `file.scala`
    > shapes.foreach({ shape =>
     ...

When I start to debug it using Eclipse 3.7, scala plug-in version 2.1.0mp3, I press F5 to enter the code. It brings me to the following files in order:

  `AbstractFunction1.class`
    > abstract class AbstractFunction1[@specialized(scala.Int, scala.Long, ..
  `Object.class`
      Source code is not found
  `AbstractFunction1.class`
    > abstract class AbstractFunction1[@specialized(scala.Int, scala.Long, ..
  `Function1.class`
    >  trait Function1[@specialized(scala.Int, scala.Long, ...
  `AbstractFunction1.class`
    > abstract class AbstractFunction1[@specialized(scala.Int, scala.Long, ..
  `file.scala`
    > shapes.foreach({ shape =>
  `file.scala`
    > shapes.foreach({ shape =>

And then eventually it shows the body of the foreach method with the while loop, not yet entering the one described in file.scala.

But I am pressing F5 7 times just to get inside a foreach loop. How can I do better ? Is it possible to specify files to be skipped automatically ?

4

1 回答 1

3

首先,请在撰写本文时将您的 Scala IDE 更新到最新的稳定版本,即 v3.0.0。

然后,您会很高兴知道 Scala IDE 提供了一个新的 Scala 调试器,它专门针对 Scala 代码进行了调整。例如,单步执行 map/foreach/... 将按需要工作,即,您将进入闭包而不被重定向到您提到的类。查看Scala 调试器文档了解更多详细信息,不要错过截屏视频

于 2013-05-17T14:19:02.023 回答