Newbie question - watching variables

Anthony Hannan ajh18 at cornell.edu
Sat Aug 25 01:26:31 UTC 2001


Kyle Bygott <Henry.Bygott at colorado.edu> wrote:
> Is there some way to set a watch on a variable such that when something attempts to change the variable it halts and lets you see whats going on?  I've got something changing a variable somewhere in my code but can't track it down for the life of me.

I would just insert a 'self halt.' before every assignment to it.  You
can find all assignments to inst vars by selecting 'inst var defs...' off
the class menu in the browser.  You can find assignments and references
to class vars by selecting 'class var refs...'.  And you can find
assignments and references to global variables by selecting the variable
name (anywhere, like in a workspace) and hit Alt-Shift-n.




More information about the Squeak-dev mailing list