CIS 1057 Chapter Notes - Chapter 7: Indirection, Unary Operation
Document Summary
A debugger program can help identify bugs in a program. Allows the programmer to execute the program one statement at a time (called single-step execution) and observe the effects. Long programs can be broken up with breakpoints, placed at selected statements. This can help the programmer see the results of each algorithm step. Without a debugger, the programmer can use diagnostic calls, in which they printf() the values of certain variables at different points throughout the program, to see at which point the bug occurs. Once the general area has been found, more diagnostic calls can be placed in the locality of the bug. We can place diagnostic calls throughout the program, and use if statements to cause them to run if we define a macro that can turn them on/off. A common error is when loops execute one time fewer or one time more than they should.