November 2013
Beginner
325 pages
9h 47m
English
You can use the debugger to browse the frames on the stack. To do this, however, you have to stop your program in mid-execution. Otherwise, main() will finish executing, and there will not be any frames left to look at. To see as many frames as possible in your BeerSong program, you want to halt execution on the line that prints “There are simply no more bottles of beer on the wall.”
How do you do this? In main.c, find the line
printf("There are simply no more bottles of beer on the wall.\n");
There are two gray columns to the left of your code. Click the wider, lighter-gray column next to this line of code to set a breakpoint.
Figure 5.5 Setting a breakpoint
A breakpoint is a ...
Read now
Unlock full access