Jeffallan/claude-skills / skills/debugging-wizard
debugging-wizard
VerifiedParses error messages, traces execution flow through stack traces, correlates log entries to identify failure points, and applies systematic hypothesis-driven methodology to isolate and resolve bugs. Use when investigating errors, analyzing stack traces, finding root causes of unexpected behavior, troubleshooting crashes, or performing log analysis, error investigation, or root cause analysis.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.8 KB |
| references/common-patterns.md | markdown | 3.0 KB |
| references/debugging-tools.md | markdown | 2.8 KB |
| references/quick-fixes.md | markdown | 3.4 KB |
| references/strategies.md | markdown | 2.9 KB |
| references/systematic-debugging.md | markdown | 13.5 KB |
references/debugging-tools.md
View on GitHub# Debugging Tools
## Debuggers by Language
| Language | Debugger | Start Command |
|----------|----------|---------------|
| TypeScript/JS | Node Inspector | `node --inspect` |
| Python | pdb/ipdb | `python -m pdb` |
| Go | Delve | `dlv debug` |
| Rust | rust-gdb/lldb | `rust-gdb ./target/debug/app` |
| Java | JDB/IDE | IDE debugger |
## Node.js / TypeScript
```bash
# Start with inspector
node --inspect dist/main.js
# Break on first line
node --inspect-brk dist/main.js
# With ts-node
node --inspect -r ts-node/register src/main.ts
```
```typescript
// In code
debugger; // Breakpoint
// Quick print
console.log({ variable }); // Shows name and value
console.table(arrayOfObjects); // Table format
console.trace('Called from'); // Stack trace
```
## Python
```bash
# Start debugger
python -m pdb script.py
# Post-mortem on exception
python -m pdb -c continue script.py
```
```python
# In code
breakpoint() # Python 3.7+
import pdb; pdb.set_trace() # Older Python
# Quick print
print(f"{variable=}") # Python 3.8+ shows name and value
# Rich debugging
from rich import inspect
inspect(object, methods=True)
```
### pdb Commands
| Command | Action |
|---------|--------|
| `n` | Next line |
| `s` | Step into |
| `c` | Continue |
| `l` | List code |
| `p expr` | Print expression |
| `pp expr` | Pretty print |
| `w` | Where (stack) |
| `q` | Quit |
## Go
```bash
# Start delve
dlv debug ./cmd/app
# Attach to running process
dlv attach <pid>
# Debug test
dlv test ./pkg/...
```
```go
// Quick print
log.Printf("%+v", variable) // With field names
fmt.Printf("%#v\n", variable) // Go syntax representation
// Spew for complex structures
import "github.com/davecgh/go-spew/spew"
spew.Dump(variable)
```
### Delve Commands
| Command | Action |
|---------|--------|
| `break main.go:42` | Set breakpoint |
| `continue` | Continue |
| `next` | Next line |
| `step` | Step into |
| `print var` | Print variable |
| `goroutines` | List goroutines |
## VS Code Debug Config
```json
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug TypeScript",
"program": "${workspaceFolder}/src/main.ts",
"preLaunchTask": "tsc: build",
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
},
{
"type": "python",
"request": "launch",
"name": "Debug Python",
"program": "${workspaceFolder}/main.py",
"console": "integratedTerminal"
}
]
}
```
## Quick Reference
| Need | Tool |
|------|------|
| Breakpoint in code | `debugger;` / `breakpoint()` |
| Print with name | `console.log({x})` / `print(f"{x=}")` |
| Stack trace | `console.trace()` / `traceback.print_stack()` |
| Inspect object | `console.dir(obj)` / `dir(obj)` |
| Step through | IDE debugger or CLI debugger |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |