[Scala 2.1 IDE for Scala 2.10M5] - debugger does not show local variables

170 views
Skip to first unread message

Ant Kutschera

unread,
Aug 16, 2012, 4:55:47 AM8/16/12
to scala-i...@googlegroups.com
In the Scala IDE for Scala 2.9.2, the debugger used to show local variables.

For example, in the following code I could add a breakpoint to the second line:

     val c2 = Colour1.withName("Orange")
        assert(c2 == Orange)

In the debugger's Variables View, I could see the value of c2.  Sometimes it was named a little funny, but I got used to that, and the debugger was useful.

With the latest Scala IDE, I have not yet seen any local variables displayed, which sadly renders the debugger useless.

Is this a known problem and will it be fixed before the final release of 2.1?

Tom Howland

unread,
Aug 16, 2012, 11:00:00 AM8/16/12
to scala-i...@googlegroups.com
just to confirm -- i'm getting the same error. I'm using

    Eclipse IDE for Java EE Developers 1.4.2.20120213-0813
    m2e - Maven Integration for Eclipse 1.1.0.20120530-0009
    m2e - slf4j over logback logging (Optional) 1.1.0.20120530-0009
    m2e connector for build-helper-maven-plugin 0.15.0.201109282249
    m2e connector for mavenarchiver pom properties 0.15.0.201109282249
    Maven Integration for Scala IDE 0.4.1
    Scala IDE for Eclipse 2.1.0.nightly-2_09-201208150315-a353925
      JDT Weaving for Scala 2.1.0.nightly-2_09-201208150315-a353925
    Scala IDE for Eclipse dev support 2.1.0.nightly-2_09-201208150315-a353925
    Scala IDE for Eclipse Source 2.1.0.nightly-2_09-201208150315-a353925

Ant Kutschera

unread,
Aug 17, 2012, 4:20:53 PM8/17/12
to scala-i...@googlegroups.com
Strangely, it has started to work.

I flicked around between the experimental debugger and the normal one, restarted a few times, built the project using Eclipse 3.7.1 and the Final Release 2.9 Plugin, then switched back to Eclipse 3.7.2 and the M1.210 Plugin, and now it seems to be working.

Ill play around and see if I can work out if this is reliably recreatable. 

On Thursday, 16 August 2012 10:55:47 UTC+2, Ant Kutschera wrote:

Mirco Dotta

unread,
Aug 18, 2012, 1:36:25 PM8/18/12
to scala-i...@googlegroups.com
I haven't noticed it, but I'll keep an eye on it.

-- Mirco

Ant Kutschera

unread,
Aug 19, 2012, 9:34:40 AM8/19/12
to scala-i...@googlegroups.com
I don't think I've restarted Eclipse 3.7.2, and with the following class I have the problem that if I set a break point at the line "out.close", I cannot see variable "data" in the variable view.

import java.io.Serializable
import java.rmi.Remote
import java.io.ByteArrayOutputStream
import java.io.ObjectOutputStream

object ChapterTwoAnnotations extends App {
    
    @scala.SerialVersionUID(1L)
    @scala.cloneable
    @scala.remote
    class SomeGreatScalaClass extends Serializable  {
        override def clone = super.clone
    }

    
    val obj = new SomeGreatScalaClass
    
    val bos = new ByteArrayOutputStream
    val out = new ObjectOutputStream(bos)
    val data = out.writeObject(obj)
    out.close

    val copy = obj.clone
    
    print("done, serialised it was " + data + " and cloned it was " + System.identityHashCode(copy) + " compared to " + System.identityHashCode(obj))
}

Ant Kutschera

unread,
Aug 19, 2012, 9:37:56 AM8/19/12
to scala-i...@googlegroups.com
Ah, wait, if I open this.$outer.data - then I can see "data", and the obvious bug in that little program :-)

But I'm sure it doesn't always work - I'll keep keeping an eye out too.
Reply all
Reply to author
Forward
0 new messages