The debugger



We can walk through the execution of a method using the Self debugger. To invoke the debugger, we send the message halt to an object that understands it, such as an integer. This puts a debugger in the hand.

We can then use the `Step' button to step execution. `Step' steps over messages that result in slot accesses or assignments, but steps into other methods. To execute a message send to completion, without showing any of the details, use `Next'.

For the withdraw: message shown, we can:

  • Step over the halt; this causes the top-level expression to become visible, with the pending expression highlighted.

  • Step into withdraw:.

  • Use `Next' to skip over details of the subtraction and the max: message.

  • Use `Continue' to complete execution, or `Abort' to abort the computation.

[ Previous ] [ Index ] [ Next ]