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.

Configuring a debug project

Configuring a debug project - C Tutorial

From the course: Debugging C Code

Configuring a debug project

- [Instructor] Like many IDEs or integrated development environments, Codespaces features a debugger. This source code available in the exercise files is open from here and it's visible in the editor window. Build the code and run the program just to ensure that it works. And it does as seen by this cheerful output. To debug this code, you must build the program with debugging information included in the executable file. Ensure that you choose debug from this menu. The program runs inside the debugger. The output doesn't look different from normal execution primarily because no break points were set. I'm going to put one at line 14 just to show you how it works and I'll explain what the break point does in just a moment. By the way, if this icon disappears, you can always choose the run and debug command from the menu over here, and you can press the F5 key as well. The process is the same, but execution has paused at this point, which is the break point in the program. Debugging…

Contents