S

Skill Entry

Systematic debugging

Replaces trial-and-error debugging with a hypothesis-driven process: state a falsifiable hypothesis, construct the smallest possible reproduction, and verify evidence before touching code. This structured approach is most valuable during production incidents, flaky CI builds, and confusing regressions where intuition-led debugging wastes hours on correlated but non-causal symptoms.

Category Operations
Platform Codex / Claude Code
Published 2026-04-02
debuggingincidentanalysis

Use cases

  • A production incident where latency spiked and the error rate doubled in the same 10-minute window
  • A CI build that fails on the main branch but passes locally with no apparent difference in environment
  • A regression where a feature that worked last week returns subtly different output today
  • An intermittent crash that occurs in less than 5% of requests and resists easy reproduction
  • A dependency update that silently changed behavior without surfacing a compile error

Key features

  • Collect observable facts—what changed recently, which users or requests are affected, and the time window of the failure
  • Formulate one or two specific, falsifiable hypotheses rather than vague guesses about what might be wrong
  • Build a minimal reproduction case that isolates the symptom from the full system, ideally reducible to a single script or request
  • Test the hypothesis against the reproduction—if the data contradicts it, discard it and form a new one
  • Once the root cause is confirmed, apply the smallest fix that addresses the cause rather than patching the symptom, then verify the reproduction no longer triggers

When to Use This Skill

  • When the same bug has been fixed multiple times but keeps reappearing
  • When debugging time exceeds 30 minutes without narrowing the problem space
  • When a bug report lacks enough specificity to reproduce the issue

Expected Output

A root-cause summary with evidence (logs, traces, or reproduction steps), a fix description, and a verification plan to confirm the issue is resolved.

Frequently Asked Questions

How do I debug when I cannot reproduce the issue locally?
Instrument the production path with additional logging or use feature flags to isolate the affected subset. Add a conditional debug log in the exact code path reported, redeploy, and capture the evidence before proceeding.
What is the most common debugging mistake?
Fixing symptoms rather than causes—adding try-catch around an error, suppressing a warning, or patching the error return value without understanding why it occurred. This creates hidden fragility that surfaces as a worse failure later.
How does systematic debugging differ from using a profiler?
Systematic debugging targets correctness issues (wrong output, crashes, exceptions), while profiling targets performance issues (slow latency, high CPU, memory bloat). Use debugging first to establish correctness, then profile to optimize what remains slow.

Related

Related

3 Indexed items