debugger? (was: Re: prototypes vs classes was: Re: Sun's HotSpot)

Dan Ingalls DanI at
Thu Oct 15 23:13:13 UTC 1998

>On Thu, 15 Oct 1998, Dan Ingalls wrote:
>> look at references to temps when you execute a do-it in the
>> debugger's code pane.

David Stes <stes at> replied:
>Can someone explain how to do this ... If I do "Inspect It" (Command-i)
>for an object and then I send a message to the object (such as remove the
>last element), the inspector isn't updated automatically (at least not for

I'm not sure exactly what is being asked here.

If you are in morphic, then the value pane (*only*) will be updated.  Meaning that if you are looking at an instvar named position, and your doit causes the position to change, then you'll see the value change in the value pane.  You would only see the result of 'remove the last element' if you currently had a field selected for viewing, that changed when you did this.  MVC inspectors don't update anything automatically.

Now... I'm not sure how you query relates to my original statement.  I was referring to the situation where you are in the debugger, viewing a method with temporary variables.  If you then do a do-it in the debugger that refers to those temps, it will be compiled specially, because the temps (context variables) are not in the context in which the temporary do-it method will execute, but in the original context.  In case that is a part of your question, do the following:

1.  Execute 'self halt', or hit cmd-. to get into a debugger.

2.  Select some method with temps on the stack.  Let us assume one is called 'zort'.

3.  In the code pane or bottomRight inspector pane, type and execute...
	self halt.  zort + 3
     This will bring up a second debugger.

4.  Select the method 'DoItIn:' on the stack.  This is what was compiled from what you typed.  It will be decompiled, and should look very much like:
    DoItIn: t1 
        self halt.
        ^ (t1 tempAt: 1) + 3

5.  In this situation, the simple variable reference (zort) is compiled to a message (t1 tempAt: 1) for the purpose of accessing a remote temporary variable.  You can probably guess the result of doing...
	self halt.  zort := 3

*And my point was*... this is exactly the mechanism needed to convert variable references declared as "pure" or, say, in any class that is part of some prototype dialect, into messages with all the desired semantics of inheritance and overridability.

So the hard work has already been done ;-).

	- D

More information about the Squeak-dev mailing list