I remember back in university, our professor introduced us to a debugger for C called GDB. At the time, I didn’t think much of it. It seemed like a powerful tool, but also way too intimidating. Setting it up felt complicated, and how it worked just seemed mystical. So, I stuck with what I knew: printf statements.
To be fair, printf can be a useful way to debug and trace your variables. But once I started my first software job, everything changed. My team showed me how to use the built-in debugger in our IDE, and it completely transformed how I approached bugs. It gave me deeper visibility into my code without the mess of dozens of debug print statements.
In this video, I’ll walk you through an example where printf just isn’t enough. I’ll show you how to set up the debugger in Visual Studio Code, walk you through using breakpoints and stepping through code, and demonstrate how much easier it is to trace and fix bugs with a real debugger.
If you’re serious about learning how to debug C programs effectively, and especially if you’re tired of the guesswork and messy trial-and-error of printf, this tutorial will give you a clear path forward.
Thank you for watching, and happy coding! 💻
-Henrik

