[Pharo-project] small thoughts... system browser to show super methods & wide debugger

Frank Shearar frank.shearar at gmail.com
Mon Mar 5 06:08:26 EST 2012

On 5 March 2012 10:32, Ben Coman <btc at openinworld.com> wrote:
> Just sharing some small thoughts as they cross my mind on the chance the are
> of any interest. Not necessarily looking for any response or action.
> 1. In the System Browser when viewing a method, this might include an
> expandable list of overridden methods.  Beneath the code of the current
> method being viewed each 'super' method would be listed with an expandable
> '+' symbol.  I have attached a mock up [1] showing all expanded but the
> default might be the collapsed state.

This is an excellent idea! I've thought of something very similar, and
never got around to doing anything with it, namely to do what you
suggest above, only also display the "sub" methods - methods of the
subclasses. I'd like some options, too: I'd prefer to see these things
expanded by default, for instance, while you'd prefer to see them
collapsed by default.

> 2. The debugger lists instance and temporary variables to be inspected, but
> not every object that 'passes through' the method being executed is held in
> a variable.  More often messages are chained together such that to inspect
> the object returned from the middle of this chain you need to select that
> bit of the code and choose to inspect it again.  However there may be
> side-effects of executing that a second time so you are not guaranteed to
> end up looking at the object actually encountered by the execution of the
> method.
> What would be interesting would be if in certain circumstances every object
> returned by every message in a method was held to be inspected.

Which means you'd want to memoise everything within this context?
There's a difficult tradeoff to be made here, I think: as you say,
invoking a method may cause side effects (even if YOU write purely
functional, side-effect-free code, the code you call may not!). Which
means sometimes you want to see how you got to where you are -
memoising the method calls so the debugger remembers the precise
history of the calculation - and sometimes (after you press <restart>)
you want to replay the computation, side effects and all. How do you
think you could present these options in the debugger? As simply as
"memoise until <restart>, and then clear the cache" as a default

>  This might
> take the form of hovering or right-clicking on any message an choosing
> something like 'inspect context'.   The circumstances this might be turned
> on for could be:
> a. globally
> b. ongoing execution from within debugger
> c. certain methods / classes / categories.
> 3. With screens getting much bigger, perhaps the debugger could have an
> option to show code from previous calls back to a certain level.  I have
> attached a mock up [2].  Even though this image shows using a lot of
> vertical space, this would be scrolled.  Ultimately it would be horizontal
> space required as the code steps in, but todays wide screens match this even
> better than those a few years ago. Note the yellow highlighted line in the
> top pane which can position how far back you look.

Bravo, too, on supplying mockups - they give an immediate feel for
what you're talking about.


> cheers, -ben
> [1] SystemBrowser - showing-overriden-methods.png
> [2] Debugger - expanded code display.png

More information about the Pharo-dev mailing list