Debugging Layout problems
RossBoylan at stanfordalumni.org
Thu Dec 27 06:01:37 UTC 2001
I have a bug in some layout code which is bringing up the emergency
evaluator. Because of this, I can not bring up an ordinary debugger.
I realize there may be no silver bullets, but does anyone have any
suggestions for getting to the bottom of this? I'm in a morphic
problem, and the problem is at least a bit subtle because the object
displays properly the first time.
Here are some strategies that have occurred to me. Which horse to bet
1) Debug by inspection. Unfortunately, I've looked at the code and
the instance variables, and nothing has jumped out. I do know where
the problem is occurring because of the emergency evaluator stack
2) Put a halt in the code. But this causes the same loop that brings
up the emergency evaluator.
3) Put a halt in the code but start it with the mouse off the problem
morph, in hopes this will avoid the display loop. It didn't.
4) Learn how to use the emergency evaluator well enough to go up the
stack and inspect the instance variables.
5) Do old fashioned debugging with trace statements to a file. Aside
from the other problems, I'm not sure if buffering would prevent the
interesting stuff from just before the problem from getting out.
I'm currently at 3.2alpha #4441. Many months ago I remember that the
system would sometimes display a red box with a yellow X across it in
somewhat similar circumstances. If there's a way to get that
behavior, that would certainly make debugging easier.
More information about the Squeak-dev