systematic-debugging
SolidSystematic approach to diagnosing and fixing errors
AI & Automation 859 stars
98 forks Updated yesterday MIT
Install
Quality Score: 96/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Systematic Debugging
A structured approach to finding and fixing bugs.
## The Debugging Loop
```
1. REPRODUCE → 2. ISOLATE → 3. DIAGNOSE → 4. FIX → 5. VERIFY
```
Never skip steps. Never guess-and-check repeatedly.
## Step 1: Reproduce
- Run the exact command that fails
- Capture FULL output (stdout AND stderr)
- Note: exit code, error message, stack trace
- If intermittent, identify what changes between runs
## Step 2: Isolate
- What's the MINIMAL input that triggers the error?
- Which specific line/function fails? (read the traceback bottom-up)
- Is it a compile error, runtime error, or wrong output?
- Does it fail on all inputs or specific ones?
## Step 3: Diagnose
### Read the error message carefully
| Error type | Where to look |
|-----------|---------------|
| Compile error | The FIRST error (later ones are often cascading) |
| Segfault | Last function in the stack trace, check array bounds and null pointers |
| Python traceback | The innermost frame (bottom), but also check the middle for context |
| Wrong output | Diff expected vs actual: `diff <(expected) <(actual)` |
| Timeout/hang | Is it an infinite loop? Deadlock? I/O bound? Add a timer or counter |
### Add minimal instrumentation
- C: `fprintf(stderr, "reached checkpoint %d\n", __LINE__);`
- Python: `print(f"DEBUG: {var=}", file=sys.stderr)`
- Check intermediate values, not just final output
- Remove debug prints after fixing
## Step 4: Fix
- Change ONE thing at a time
- If the same approach fail...
Details
- Author
- vstorm-co
- Repository
- vstorm-co/pydantic-deepagents
- Created
- 6 months ago
- Last Updated
- yesterday
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
systematic-debugging
Use when a verification gate fails and the next fix needs reproducible diagnosis instead of speculative patching.
6 Updated 3 days ago
DYAI2025 AI & Automation Listed
systematic-debugging
Use when a bug, failing test, incident, or unexpected behavior has unknown cause and scope is not yet frozen.
10 Updated 3 days ago
funky-eyes AI & Automation Listed
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior. Enforces root-cause investigation before fixes. The Iron Law — no fixes without understanding why.
6 Updated yesterday
RBraga01