Adding the message halt
To interrupt the running of your code, find a place in your code where you want to gather information. Then, specify a breakpoint by adding the message halt or the expression self halt.
For example, evaluate the following code in a Workspace with the Execute command:
(OrderedCollection new)
halt;
add: 'Alix';
add: 'Sam';
add: 4;
add: (Date today);
at: 4 put: 'Cathy';
yourself.
A debugger opens, showing the error message '(ExHalt) A halt has occurred.' The top of the stack has the following messages:
[] in <optimized block>(ExceptionalEvent class)>>#initializeSystemExceptions
Signal>>#evaluate:
Signal>>#evaluateDefaultHandler:
ExceptionalEvent>>#applyDefaultHandler:
ExceptionalEvent>>#signalFor:
ExceptionalEvent>>#signalWithArguments:
ExceptionalEvent>>#signal
OrderedCollection(Object)>>#halt
UndefinedObject>>#Doit
Select OrderedCollection(Object)>>#halt in the message stack and inspect self in the list of variables. Notice that the ordered collection exists but contains no entries.
Last modified date: 03/13/2019