Last Updated: June 6, 2026
C++ gives a lot of rope, and most of it ends up tangled around pointer arithmetic, uninitialized memory, and threads racing for the same byte. This chapter covers the tools that turn cryptic crashes and silent corruption into real, fixable bugs: a disciplined debugging mindset, gdb (with an lldb mapping for Mac users), Valgrind, and the family of sanitizers that ship with g++ and clang++.