The debugger lets you step through the program, line by line or function by function, seeing the values of variables so you can tell what’s wrong. Good idea, right?
I think so. To cover useful debugger commands, let’s use the debugger to repair the flawed program in Example
9-1. It’s intended to draw a US flag: a sort of a groovy handmade-looking version with hollow stars as shown

. (To do a better job, we’d use an image from a file – but for now I want to debug a star-writing function.) The design ...