Overview & Purpose
Debugging Approach is a systematic method for isolating software bugs, performance bottlenecks, and hardware/network errors without reliance on guess-and-check.
When to Use
- Software Debugging: Investigating stack traces, test failures, memory leaks, or unexpected output.
- System Troubleshooting: Diagnosing configuration errors or environment mismatches.
Execution Workflow
- Reproduce & Isolate: Establish minimal reproducible example.
- create Hypotheses: List potential failure points based on error signature.
- Binary Search Isolation: Divide search space in half (e.g., git bisect, narrowing down line numbers or components).
- Inspect State: Verify actual vs expected values at boundaries.
- Fix & Verify: Apply minimal necessary fix and verify no regressions.
Expected Output Contract
### Debugging Report
- **Error Signature**: [Stack trace / symptom]
- **Isolation Boundary**: [Component / line identified]
- **Root Cause**: [Mechanism of failure]
- **Verification**: [Test confirming fix]
Scripts
scripts/debugging_approach.py- Deterministic evaluation, state validation, and CLI tool for debugging-approach.