Debugging Your Programs, Part 3
In This Chapter
Debugging using the built-in debugger
Building your application with debugger information
Setting a breakpoint
Single-stepping your program
Fixing a sample problem
In this chapter, I introduce you to the debugging tools built into the Code::Blocks development environment (similar tools exist for most other environments). Learning to use the debugger will give you clear insight into what your program is doing (and what it’s not doing, at times).
A New Approach to Debugging
Chapters 8 and 13 demonstrated how to find problems by adding output statements in key positions. Outputting key variables lets you see what intermediate values your program is calculating and what path it’s taking through your C++ code.
However, the output technique ...