From the course: Debugging C Code

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Stepping through your code

Stepping through your code - C Tutorial

From the course: Debugging C Code

Stepping through your code

- [Instructor] To examine a program as it runs, you step through it. You can set as many break points as you need, but you need at least one to debug code in code spaces. I'll set a break point here at line one, click to the left of the line number where you want the program to pause. Remember that these numbers are for reference. They're not part of your C code. Run and debug. Remember that the keyboard shortcut to debug is F5 in code spaces and only when the program is paused do you see these tools. The goal is to examine the program's progress as well as to check the values of variables and the contents of memory. The first breakpoint can't be outside the code, so the debugger logically stops it here at the first real statement. Variables used by the code are displayed here, showing their current values use this toolbar to process the code, which now sits paused within the debugger. Continue runs the rest of the program, stopping only at a future breakpoint or when the program…

Contents