
Always terminate your current debugging session using “Stop” or “Continue” till the end of the program. The Stop button ends the debugging session. The Continue button resumes the program execution, up to the next breakpoint, or till the end of the program. At each of the steps, you could examine the internal state of your program, such as the value of the variables, the outputs produced by the program, etc. This step enables the Watch pane.Ĭlick the Next line button on the toolbar to single-step thru your program. Click the Debugging Windows button on the Debug toolbar and select Watches.

A yellow arrow appears and points at the next statement to be executed. The program begins execution but suspends its execution at the breakpoints. To start debugging the program, choose Debug menu > Start (F8).
Codeblocks c series#
A red circle appears indicating a breakpoint has been set at that particular line as shown below.Īlternatively, you can choose Toggle Breakpoint (F5) from the Debug menu. In this entire series of C tutorial, I will use CodeBlocks IDE to create, compile, debug and execute C programs. You can create a breakpoint by clicking on the left margin. A breakpoint suspends program execution for you to examine the internal states of your program. You can use the graphic debugger to debug the C program.


The IDE used in the tutorial is Code:: Blocks.ĭebugging a C program saves you countless hours guessing what went wrong with your program. In this tutorial, we will learn steps to debug a C Program.
