TestBrowser freezes - how to debug

Ned Konz ned at bike-nomad.com
Tue Apr 1 06:55:58 UTC 2003


On Monday 31 March 2003 10:23 pm, Martin Drautzburg wrote:
> Ned Konz <ned at bike-nomad.com> writes:
> > > One thing I don't understand is when I evaluate "submorphs
> > > includes: scrollBar" from the walkback I get a "true". But
> > > obviously showScrollBar did not return though.
> > >
> > > showScrollBar
> > > 	(submorphs includes: scrollBar)
> > > 		ifTrue: [^ self].
> > > 	self resizeScrollBar.
> > > 	self privateAddMorph: scrollBar atIndex: 1.
> > > 	"scrollBar changed."
> > > 	retractableScrollBar
> > > 		ifFalse: [self resetExtent]
> >
> > By the time the debugger has come up, you've managed to re-draw
> > the world.
>
> So what I see in the Debugger is the *current* state of the objects
> not the state at the time of execution ? It this a block closures
> issue ?

No, it's just that when the debugger comes up on the UI process, 
another UI process is started (because we need the UI to run the 
debugger). And that UI process will also be running in the World, 
which means that Morphs in the World will be stepping/sizing/etc.

So when you examine the state of a Morph that's still drawable (i.e. 
not marked as having an error in drawing), it may be different than 
it was when the error occurred. Like, say, if there was an error in a 
Browser that was caused by some user action; you could pop up the 
debugger and then resize the browser window. Those changes to the 
Browser size/position would be live.

I've long wanted to have a Preference or magic shortcut key that would 
suspend and preserve the Morphic UI Process, and switch to MVC so I 
could debug it without counting on anything in Morphic working (like 
when you break something really deep in Morph or the main loop). This 
would probably also require using a Canvas that wouldn't destroy the 
MVC screen.

Even a remote debugger that would over the net or a serial port would 
be useful in some cases.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list