debug on var changed

Torge Husfeldt jean-jacques.gelee at gmx.de
Fri Jun 14 13:12:58 UTC 2002


Hi Niko,
You normally accomplish this with setters (not the dogs ...;)
First, browse all instVarDefs, replace them with the correct setter
call, and then inside the setter method put a 'self halt' (or 'Object
halt' if you're not sure that self is derived form Object).
There might be more sophisticated ways to do this or even a chance for
you to dig into the debugger to provide a handy shortcut, but this
procedure allways works and it is suggested that you use getters/setters
anyway if a class is reasonably complex.

HTH,
Torge
Niko Schwarz wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> hi, Is there a way to tell the debugger to halt when an instance variable is
> altered?
> 
> regards,
> 
> nick
> - --
> There can be no twisted thought without a twisted molecule.
>                 -- R. W. Gerard
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE9CPUEc9uyCiO8RNQRAocEAJ0bhN/EqAT4516UBi3sc+Mbf8HReACgio28
> A3HnLoPbQ37tVS3pvYb/hAs=
> =/pEB
> -----END PGP SIGNATURE-----



More information about the Squeak-dev mailing list