Debugging
Debugging is the process of locating and fixing program defects, using breakpoints, logging, stack traces, and interactive REPLs to analyze behavior.
Purpose
Systematically locate defect root causes for efficient fixes.
Mechanism
Strategies: bisection (git bisect pinpoints the offending commit), minimal reproduction, bisecting by commenting out code. Tools: breakpoint debuggers (step/watch), log injection, core dump analysis, remote debugging. Understand before fixing—never change blindly.
Use cases
- Bug fixing
- Problem localization
- Development skill