debugging-strategies

Diagnose software bugs using systematic reproduction, hypothesis testing, and profiling techniques.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill debugging-strategies-ttnhan18062000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging-strategies
Source: https://github.com/ttnhan18062000/rpg-based-simulation/tree/main/.agents/skills/debugging-strategies
Command: npx skills add https://github.com/ttnhan18062000/rpg-based-simulation --skill debugging-strategies-ttnhan18062000

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often devolves into guesswork and random code changes. This Skill replaces that with a structured scientific method—reproduce, gather evidence, hypothesize, test—so you find root causes faster across JavaScript, TypeScript, Python, and Go codebases. ## Core Features & Use Cases - Systematic Four-Phase Process: Reproduce the bug, gather environment and error information, form hypotheses, and verify fixes with binary search and isolation techniques. - Language-Specific Tooling: Ready-to-use debugger setups for Chrome DevTools, VS Code, pdb/ipdb, Delve, plus profiling with cProfile, pprof, and the Performance API. - Pattern Playbooks: Targeted strategies for intermittent bugs, performance bottlenecks, memory leaks, and production-only failures, including git bisect workflows and heap snapshot comparison. - Use Case: A flaky test fails only in CI. Apply the intermittent-bug pattern: add timing logs, check for race conditions in async code, then use git bisect to locate the regressing commit. ## Quick Start Ask the AI to help debug a specific error by pasting the stack trace and describing the expected versus actual behavior.

Frequently Asked Questions about debugging-strategies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug intermittent or flaky bugs?

Intermittent bugs require extensive logging of timing, state transitions, and external interactions to catch the failure condition. Look for race conditions in async code, then stress test by running the scenario many times with varied timing and load.

How to find which commit introduced a bug with git?

Use git bisect: mark the current commit as bad and a known working commit as good, then test each midpoint checkout Git presents. After each test, run git bisect good or bad until the exact regressing commit is identified.

What Python debugging tools should I use?

Use the built-in breakpoint() function or pdb for interactive debugging, and ipdb for an enhanced interface. For performance issues, run cProfile and analyze results with pstats to find the slowest functions by cumulative time.

How do I detect memory leaks in Node.js applications?

Monitor process.memoryUsage().heapUsed over time and generate heap snapshots with v8.writeHeapSnapshot() when usage grows abnormally. In Chrome DevTools, compare heap snapshots taken before and after an action to find retained objects.

Why does a bug only happen in production but not locally?

Production-only bugs usually stem from environment differences: dependency versions, data volume, configuration, or user permissions. Gather evidence from error tracking and logs, then reproduce locally with anonymized production data and matching environment settings.

When should I use a debugger instead of console.log?

Use an interactive debugger when you need to inspect complex state, step through execution, or set conditional breakpoints without modifying code. Console logging suffices for simple value tracing but becomes noisy for deep call stacks or timing-sensitive issues.