
Chapter 9
Debugging and Profiling
9.1 Introduction
In this chapter we provide some guidance on tools and strategies that should
make debugging your code easier and faster. Basically, you must first try to
identify the source of the error. While it is generally easy to find where the
program actually failed, that is not usually the place where the programming
error occurred. Some bugs are reproducible; that is, they occur every time a
sequence of commands is executed on all platforms, and others can be more
elusive; they arise intermittently and perhaps only under some operating sys-
tems. One of the first things that you should do when faced with a likely ...