A debugger problem?

There is a simple code from "Programming in Scala", chapter 7:

package multitable

object MultiTable {
def main(args: Array[String]) {
val multi = {
val table = for (i <- 1 to 10) yield {
val row = for (j <- 1 to 10) yield {
val prod = (i * j).toString
String.format("%4s", Array(prod))
}
row.mkString + "\n"
}
table.mkString
}

println(multi)
}
}

I placed a breakpoint at the line "String.format("%4s", Array(prod))"
Debugger does not stop on it. When I di dthe same thing in Eclipse plugin, it did stop. Is it a bug in IntelliJ IDEA plugin's debugger?

I tried the same thing in Netbeans Scala plugin. It didn't stop either, saying that there is no executable code at this line.... Ok, but how Eclipse manages to stop?

Edited by: Vladimir Kelman on Aug 3, 2008 10:00 AM

0

Yep, this is problem. (The same problem with anonymous classes)
This problem goes to Java debugger problem with anonymous classes, because it's compile in different class file. So, we must to understand what name of this class files, and to set to each line, line in this class file. In eclipse developers do this work, we have not implemented this yet, but you must be sure, it will be, because it is not convenient to work without for debugger
When I need this, I usually delete for statement and work with single iteration, but it's bad recommendation to our plugin.

0

Thank you. I'd be happy to help by reporting errors, because it makes plugins better and Scala - more popular.

0

Fixed.
You will see this in next release or in current svn version.

0

请先登录再写评论。