Step over should skip closure initialization
Take the following example and put a breakpoint on the first line inside the main method
Start the debugger, and the hit Step Over. At this point, you would expect to be executing the code inside the closure, while you are actually executing the initialization of the underlying anonymous class. It would be nice if this can be avoided, but Luc says it may be tricky (or even impossible).
By the way, the following works fine:
The different behavior is because of the outputted LineNumberTable in the binary.
object Main {
def main(args: Array[String]): Unit = {
List(1) map {
i: Int => i + 1
}
}
}
Start the debugger, and the hit Step Over. At this point, you would expect to be executing the code inside the closure, while you are actually executing the initialization of the underlying anonymous class. It would be nice if this can be avoided, but Luc says it may be tricky (or even impossible).
By the way, the following works fine:
object Main {
def main(args: Array[String]): Unit = {
List(1) map { i: Int =>
i + 1
}
}
}
The different behavior is because of the outputted LineNumberTable in the binary.
Leave a comment
on 2015-03-27 11:46 *
By Simon Schäfer
Version changed from 2.1.0-nightly-210 to 4.0.0
Milestone changed from Helium SR1 to -none-