Back to Basics: Debugging in C++
summary
Argues programmers spend roughly 35–50% of time debugging and often budget 50–75% for it, then demonstrates concrete debugging work: compile with -g and -Wall, use GDB TUI, set break and conditional breakpoints, inspect with bt, info locals, print and watch, attach to live processes, and use reverse execution via target record full. Compares printf/macro logging and delta debugging to interactive stepping, shows a segmentation fault investigation and how numbers of lines and library vs source affect choices.
AI-written summary · about
chapters (34)
- 0:00Start
- 0:11How Much Time Do You Think Programmers Spend Debugging
- 1:56Debugging Strategies
- 3:43What Is a Bug
- 4:51Software Bugs
- 9:32Why Is It Hard To Write Correct Software
- 11:16Behavior of Unknown Libraries
- 11:42Typos
- 13:15Goals
- 15:57Debugging Techniques and Strategies
- 16:28Scan and Look Debugging
- 16:50The Scan and Look Strategy
- 19:09Compiler
- 19:23Compiler Flags
- 19:56Static Analysis
- 20:36Cons
- 21:10Printf Debugging
- 24:49Delta Debugging
- 28:04Macros
- 28:44Challenges
- 30:41An Interactive Debugger
- 31:07Gdb
- 33:41Standard Array Example
- 34:04Compiling with Debugging
- 35:09Start Gdb
- 36:26Temporary Breakpoint
- 38:03Restart this Debugging Process
- 42:39Gdb's Text User Interface
- 47:34Segmentation Fault
- 49:52Back Trace
- 53:39Print the Type out of O1
- 54:05Loops
- 58:01Can You Overwrite Values of the Existing Variables
- 1:00:02General Tips on Debugging








