-->
Previous | Table of Contents | Next |
The Debugger is displayed whenever an error occurs in your Smalltalk code. It shows you where the error occurred and how the system got there. The Debugger runs in one of three modes; normal, modal, and inspecting.
When in normal mode and an error occurs in a process, which is not the event handler process, the debugger starts up on top of the erroneous process. This blocks all interaction with the affected process and its views. Other views are still active and respond as usual.
When an error occurs in the Smalltalk event handler process, the debugger starts in modal mode. While a modal debugger is active, you can not interact with any other view.
The inspecting mode can be entered from the ProcessMonitor by the pop-up menu and allows inspection of the state of other processes. But because the debugged process may continue to run, it is only possible to inspect a snapshot of the affected process.
The Debugger contains four subviews:
The Debugger is shown in Figure 31.16.
Figure 31.16. The Debugger.
The functions that are common to each view appear as a set of buttons below the context walkback list. These functions are described in Table 31.13.
Button | Description |
---|---|
continue | Continues execution. |
terminate | Terminates the erroneous process. |
abort | Abort the current activity if possible. |
step (single step) | Lets the process continue execution until the next send is executed in the currently selected context. |
send (single send) | Lets the process continue execution for one message send. |
return | Continues execution as if the selected context returned. |
restart | Continues execution by restarting the selected context. |
The walkback subview has a pop-up menu with the functions described in Table 31.14.
Function | Description |
---|---|
exit smalltalk | Leaves ST/X without saving an image. |
show more | Shows 50 more contexts of the walk-back. |
breakpoints | Not yet available. |
trace on/off | Not yet available. |
trace step | Not yet available. |
A miniDebugger is entered if an error occurs within the Debugger itself. This is a line-by-line debugger that allows limited debugging without the use of a graphical user interface. It is controlled by entering commands in the Xterm window where ST/X was started. If you type ? at the miniDebugger prompt, you will get a list of commands that are available for use in this stripped-down debugger.
This chapter introduces you to the Smalltalk environment that is provided by the Smalltalk/X application. If you are interested in learning how to program using Smalltalk and dont have access to one of the commercial versions of Smalltalk, then Smalltalk/X is perfect for you. Not only does Smalltalk/X come with all the tools and programming aids that are talked about in this chapter, but it also comes with many examples and some fairly complete documentation that will make learning Smalltalk easier for you.
It is worth mentioning that Linux also comes with the GNU version of Smalltalk called mst. This chapter was devoted to talking about Smalltalk/X because it is much more complete than GNU Smalltalk. From here, you can learn:
Previous | Table of Contents | Next |