5 Debugging

5.1 Introduction

The GUI interface to the MLWorks debugger is provided by the error browser and the stack browser, both of which we saw in operation briefly in Chapter 1. The error browser deals with compile-time errors, while the stack browser deals with run-time errors. In this chapter, we shall take a longer look at what the stack browser does and at the various ways in which it can be invoked. The error browser does not need further treatment.

We shall also look at the facilities for tracing evaluations, setting execution breakpoints on functions, and how to step through evaluations call by call.

Note: Before running any of the examples in this chapter, ensure that debugging mode is on, and optimizing mode is off. You can do this by invoking MLWorks with the -debug-mode option, or from the MLWorks podium's Preferences > Mode dialog. (The Preferences > Save Preferences menu item will save any preferences in force and use them in the future whenever you start up MLWorks again.) You should also make sure that you have set your preferred editor; see Section 1.9. Finally, if your preferred editor is the Emacs server, you should make sure you have Emacs running and have started the server with the M-x mlworks-server command.


MLWorks User Guide (UNIX version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker