Examining a message stack
Finding the cause of an error is best illustrated by example. Return to the debugger that contains information on an error that resulted from evaluating
(OrderedCollection new)
at: 4 put: 'Sam'
Because you used an Edit menu option to run the code, find the message Doit in the message stack and select it. The debugger displays the following:
Message stack
The expression that generated the error is shown in highlighted text. Note the message at:put: in the expression.
Now, look at the next message up in the stack to find the cause of the error. The message is OrderedCollection>>#at:put:. Select the message. The code it executes appears in the description pane with the current message send highlighted, and the current temporary variables appear in the list of variables.
To pinpoint what needs to be changed in the code, inspect the variables.
Last modified date: 03/13/2019