Stepping through code one message at a time enables you to check its execution. The push buttons in the middle of the debugger provide four ways of stepping through code:
You can try each one of these out from the debugger opened in Adding the message halt. To begin, select UndefinedObject>>#Doit
from the stack. The message halt is highlighted in the
description pane with the statement add: 'Alix'
below it. Select Into. The statement add:
'Alix' is now highlighted with
UndefinedObject>>#Doit the top of the stack.
If you continue selecting Into, the debugger steps through a series of messages. After it executes the methods used for add: 'Alix', it returns to UndefinedObject>>#Doit. The next statement, add: 'Sam', is now highlighted.
Now try Over. Selecting Over highlights the next statement, add: 4.
Next, select Return. This highlights the entire expression that you evaluated.
Finally, select Resume. The code executes and the debugger closes.
As you step through the messages in the stack, you can inspect objects and see how their contents change as a result of messages.