Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Smalltalk
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Notifier/Debugger === The default response to an unhandled exception is to open a Notifier, which is a window containing a stack backtrace of the first few activations, and buttons such as "Debug", "Proceed", "Close", etc. If the programmer chooses "Debug" then the full debugger opens. This has six panes. At the top is the stack window, containing a list of the contexts in the stack. Selecting a context causes the middle pane to display the text of the context's method, and to highlight the current expression within the method. Selecting the top context will display the method raising the exception and the message raising the exception will be highlighted. Selecting a context causes the bottom four panes to be updated. The bottom left two panes are the receiver inspector, that inspect the receiver of the selected message. The bottom right two panes are the context inspector that show the argument and temporary variable names in the selected context and allow display and modification of these variables. Sending the message <code>self halt</code> causes an exception which opens a notifier, providing a simple breakpoint facility (typically breakpoint facilities provide more than just the simple halt, but it was the first such facility). Workspaces also provide a "debug it" evaluator which opens a debugger on the selected expression positioned at the first message send within the expression. So selecting <code>52 factorial</code> and choosing "debug it" from the pop-up menu opens a debugger with the "doit context" selected and the <code>factorial</code> selector highlighted. The debugger provides buttons to do "step into", "step over", etc. Hence by choosing "step into" one can explore the evaluation of <code>52 factorial</code>. In this way the debugger provides an inspector of a process, allowing one to explore a halted computation. If an exception results from a doesNotUnderstand:, or subclassResponsibility send, then the notifier will include a "Create" button, allowing the programmer to choose where in the receiver's hierarchy to define an "initial draft" of the method to be implemented. Redefining a method in the debugger causes the selected context to reset back to the first statement (arguments are not modifiable in Smalltalk so this gets the execution state back to the start of a method). In this way the debugger supports live programming, defining methods as the computation proceeds. This is an extremely productive and enjoyable way to program. Everything in the system is at your finger tips. One has the full power of workspaces to evaluate subexpressions, and the browser to search for supporting code as one programs. [[File:Squeak MNU demonstrate programmingIn.png|thumb|right|Squeak Notifier for #demonstrate:programmingIn: MessageNotUnderstood error]] Clicking on the Debug button opens the Notifier into a Debugger allowing inspecting the call stack and editing and continuing from any method activation. In this case the Notifier has created a template of the missing method that the programmer can edit, compile, and then continue the computation. [[File:Squeak Debugger Define demonstrate-programmingIn-.png|thumb|right|Squeak Debugger showing live programming in the debugger]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)