Debugging

Domain: Software Engineering

🎯 Motivation

Finding and fixing bugs. Involves reproducing the bug, finding the cause, and fixing it.

📋 Concrete Example

Debugging: 1) Reproduce: run the code, see the wrong output. 2) Isolate: which function is wrong? 3) Inspect: add print statements or use a debugger. 4) Fix: change the code. 5) Test: verify the fix. 6) Check: did the fix break anything else?

🔗 Analogy

Debugging is like detective work - find the crime scene (bug), gather evidence (logs, state), identify the suspect (root cause), and fix the problem. Systematic investigation.