Stepper

Charles-A. Rovira crovira at wt.net
Mon Feb 14 04:51:27 UTC 2000


Hello Dan,

I've always lamented that there was no trace facility in any Smalltalk I've ever used.

There are times when you want to simply trace to insure that a test script is invoking every method you thought (planned) it would and a trace. Just a list of "Class>>method;<statement#>" would have been very handy as the execution streams or as it bounces around.

It also makes performance monitoring a tad easier.

-Charles-A.

Dan Ingalls wrote:

> A simple solution I once used was to provide a 'watch' command in the browser.  This built a little wrapper method which replaced the original in the method dictionary of that class, and cached the old method in a literal (;-).  I used this same structure for allowing one to proceed N times through this kind of breakpoint.  it's not especially clean, but I think it only took a day to get it going and it really worked (*).
>
> It wouldn't be too hard to use the same scheme to do a proceed-to function:  You could just trap every implementation of the selector in question, but the traps would only "take" if called from that place in that method.  When one finally took, you would remove all of them.
>
> I'm not saying this is how to do it, but that it can be done, it's not hard, and it's quite efficient.
>
>         - Dan
>
> (*) I won't say when I did this, but I was still at PARC.  I sumbitted it as a goodie and, ironically, it never was made part of the release as long as I was there.





More information about the Squeak-dev mailing list