Version française
Home     About     Download     Resources     Contact us    
Browse thread
Olabldebug on classes?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Whitley <whitley@c...>
Subject: Olabldebug on classes?

Hello all,

Perhaps I am simply being a bit slow today, but I cannot seem to get
olabldebug to print/display class instance variables, mutable or
otherwise.

Consider the code example below.  When the debugger is stopped at
method bal, the commands "print bar" and "print baz" only produce the
"Unbound identifier" error message.  I can print parameters to invoked 
methods, but that's about it.

So how does one apply the debugger to classes?

Thanks much,
John

--cut here--------------------------------------
(* test main file *)

class foo n =
object
  val bar = n
  val mutable baz = 1
  method bal = baz <- baz*bar
end

let test = new foo 2

let _ =
  for i = 1 to 20 do
    test#bal
  done

--cut here--------------------------------------