Newbie question - watching variables

Ned Konz ned at bike-nomad.com
Sat Aug 25 19:03:12 UTC 2001


On Friday 24 August 2001 10:16 pm, Hans-Martin Mosner wrote:
> > Kyle Bygott 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.  Any features like
> > this would help immensely.  Thanks,
> >     Kyle Bygott
>
> I intend to do that with my "enhanced debugger" stuff when I've decided
> upon a way of doing breakpoints. My plan is to have the following things:
> 1. breakpoints which can be set and removed without changing context state
> 2. conditional breakpoints and iteration checks (just like in VA)
> 3. variable assignment breakpoints for inst vars, temps and globals

I assume you've seen Terry Raymond's Crafted Smalltalk debugger for VW. It 
uses "code probes" that are sequences of bytecodes inserted into methods for 
its breakpoints and watchpoints. It adds a management layer to keep track of 
what methods have been changed, of course, and enhances the debugger and 
compiler to deal with these methods.

You can insert (possibly conditional) breakpoints on instvar, classvar, etc. 
changes.

> I have rough ideas on how to do this, but the first item is somewhat
> complicated and requires enough uninterrupted thinking time, which I
> don't have at the moment :-(
> Perhaps I should do simple things first and defer the first item...
>
> Cheers,
> Hans-Martin

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list