From the course: Debugging C Code

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building a debug project

Building a debug project - C Tutorial

From the course: Debugging C Code

Start my 1-month free trial

Building a debug project

- [Instructor] A debugger is effective only when you've compiled your code in a manner the debugger can read. So here in Code::Blocks you must specifically craft a project for debugging. File, New, Project. I'll choose a console application ideal for C language text-mode programs. Go, C language, Next and for the project name I'm going to type in this name which is related to the movie title. Now this file that's being generated is not included with the exercise files, as it's generated automatically. And then ensure that you have checked Create Debug configuration, Finish. Open the pre-built main.C source code file and let's build and run. And there's the output, pretty generic and expected but what about the debugger? Well let's click the run button on the debug toolbar here. Interesting, the program starts and stops. Run through the debugger, now any messages that are output are generated by the code appear on the…

Contents