wshobson avatar

Debugging Strategies

When you're staring at a stack trace at 2 AM wondering why your code works locally but crashes in production, this skill walks you through systematic debugging instead of random console.log() hunting. It covers the scientific method for bug hunting, binary search techniques for isolating problems, and proper use of debuggers like Chrome DevTools, pdb, and Delve. The differential debugging approach is especially solid for those "works on my machine" situations where you methodically compare working vs broken environments. Less guesswork, more structured problem solving.

skills.sh installs
13.9K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill debugging-strategies --agent claude-code

Installs into .claude/skills of the current project.

Files

Debugging Strategies

Transform debugging from frustrating guesswork into systematic problem-solving with proven strategies, powerful tools, and methodical approaches.

When to Use This Skill

  • Tracking down elusive bugs
  • Investigating performance issues
  • Understanding unfamiliar codebases
  • Debugging production issues
  • Analyzing crash dumps and stack traces
  • Profiling application performance
  • Investigating memory leaks
  • Debugging distributed systems

Core Principles

1. The Scientific Method

1. Observe: What's the actual behavior? 2. Hypothesize: What could be causing it? 3. Experiment: Test your hypothesis 4. Analyze: Did it prove/disprove your theory? 5. Repeat: Until you find the root cause

2. Debugging Mindset

Don't Assume:

  • "It can't be X" - Yes it can
  • "I didn't change Y" - Check anyway
  • "It works on my machine" - Find out why

Do:

  • Reproduce consistently
  • Isolate the problem
  • Keep detailed notes
  • Question everything
  • Take breaks when stuck

3. Rubber Duck Debugging

Explain your code and problem out loud (to a rubber duck, colleague, or yourself). Often reveals the issue.

Systematic Debugging Process

Sponsors

Details

Repository
github.com/wshobson/agents
Category
Debugging

More from wshobson/agents

All 174

Recommended

More Debugging
1dimillian avatarswiftui-performance-auditdimillian/skillsAudit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory u10.4Kskills.sh installs
2anthropics avatardebuganthropics/knowledge-work-pluginsStructured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "somet6Kskills.sh installs
3jeffallan avatardebugging-wizardjeffallan/claude-skillsParses error messages, traces execution flow through stack traces, correlates log entries to identify failure points, and applies systematic hypothesis-driven m5.4Kskills.sh installs
4thananon avatardebug-mantrathananon/9arm-skillsFour-mantra debugging discipline — reproduce, trace the fail path, falsify the hypothesis, cross-reference every breadcrumb. Recite the mantra block verbatim at5Kskills.sh installs
5dpearson2699 avatardebugging-instrumentsdpearson2699/swift-ios-skillsDebug iOS apps and profile performance using LLDB, the interactive Memory Graph Debugger, and Instruments. Use for crashes, retain-cycle inspection, hangs, buil4.3Kskills.sh installs
6chromedevtools avatardebug-optimize-lcpchromedevtools/chrome-devtools-mcpGuides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slo3.9Kskills.sh installs