debugging-techniques
БесплатноБез исполняемых скриптовНе проверенDebugging workflows for Python (pdb, debugpy), Go (delve), Rust (lldb), and Node.js, including container debugging (kubectl debug, ephemeral containers) and…
от ancoleman★ 535 звёзд на GitHubОб этом скилле
Debugging Techniques
Purpose
Provides systematic debugging workflows for local, remote, container, and production environments across Python, Go, Rust, and Node.js. Covers interactive debuggers, container debugging with ephemeral containers, and production-safe techniques using correlation IDs and distributed tracing.
When to Use This Skill
Trigger this skill for:
- Setting breakpoints in Python, Go, Rust, or Node.js code
- Debugging running containers or Kubernetes pods
- Setting up remote debugging connections
- Safely debugging production issues
- Inspecting goroutines, threads, or async tasks
- Analyzing core dumps or stack traces
- Choosing the right debugging tool for a scenario
Quick Reference by Language
Python Debugging
Built-in: pdb
# Python 3.7+
def buggy_function(x, y):
breakpoint() # Stops execution here
return x / y
# Older Python
import pdb
pdb.set_trace()
Essential pdb commands:
list(l) - Show code around current linenext(n) - Execute current line, step over functionsstep(s) - Execute current line, step into functionscontinue(c) - Continue until next breakpointprint var(p) - Print variable valuewhere(w) - Show stack tracequit(q) - Exit debugger
Enhanced tools:
ipdb- Enhanced pdb with tab completion, syntax highlighting (pip install ipdb)pudb- Terminal GUI debugger (pip install pudb)debugpy- VS Code integration (included in Python extension)
Debugging tests:
pytest --pdb # Drop into debugger on test failure
For detailed Python debugging patterns, see references/python-debugging.md.
Go Debugging
Delve - Official Go debugger
Installation:
go install github.com/go-delve/delve/cmd/dlv@latest
Basic usage:
dlv debug main.go # Debug main package
dlv test github.com/me/pkg # Debug test suite
dlv attach <pid> # Attach to running process
dlv debug -- --config prod.yaml # Pass arguments
Essential commands:
break main.main(b) - Set breakpoint at functionbreak file.go:10(b) - Set breakpoint at linecontinue(c) - Continue executionnext(n) - Step overstep(s) - Step intoprint x(p) - Print variablegoroutine(gr) - Show current goroutinegoroutines(grs) - List all goroutinesgoroutines -t- Show goroutine stacktracesstack(bt) - Show stack trace
Goroutine debugging:
(dlv) goroutines # List all goroutines
(dlv) goroutines -t # Show stacktraces
(dlv) goroutines -with user # Filter user goroutines
(dlv) goroutine 5 # Switch to goroutine 5
For detailed Go debugging patterns, see references/go-debugging.md.
Rust Debugging
LLDB - Default Rust debugger
Compilation:
cargo build # Debug build includes symbols by default
Usage:
rust-lldb target/debug/myapp # LLDB wrapper for Rust
rust-gdb target/debug/myapp # GDB wrapper (alternative)
Essential LLDB commands:
breakpoint set -f main.rs -l 10- Set breakpoint at linebreakpoint set -n main- Set breakpoint at functionrun(r) - Start programcontinue(c) - Continue executionnext(n) - Step overstep(s) - Step intoprint variable(p) - Print variableframe variable(fr v) - Show local variablesbacktrace(bt) - Show stack tracethread list- List all threads
VS Code integration:
- Install CodeLLDB extension (
vadimcn.vscode-lldb) - Configure
launch.jsonfor Rust projects
For detailed Rust debugging patterns, see references/rust-debugging.md.
Node.js Debugging
Built-in: node --inspect
Basic usage:
node --inspect-brk app.js # Start and pause immediately
node --inspect app.js # Start and run
node --inspect=0.0.0.0:9229 app.js # Specify host/port
Chrome DevTools:
- Open
chrome://inspect - Click "Open dedicated DevTools for Node"
- Set breakpoints, inspect variables
VS Code integration:
Configure launch.json:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/app.js"
}
Docker debugging:
EXPOSE 9229
CMD ["node", "--inspect=0.0.0.0:9229", "app.js"]
For detailed Node.js debugging patterns, see references/nodejs-debugging.md.
Container & Kubernetes Debugging
kubectl debug with Ephemeral Containers
When to use:
- Container has crashed (kubectl exec won't work)
- Using distroless/minimal image (no shell, no tools)
- Need debugging tools without rebuilding image
- Debugging network issues
Basic usage:
# Add ephemeral debugging container
kubectl debug -it <pod-name> --image=nicolaka/netshoot
# Share process namespace (see other container processes)
kubectl debug -it <pod-name> --image=busybox --share-processes
# Target specific container
kubectl debug -it <pod-na
Установить debugging-techniques в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл debugging-techniques?
Debugging workflows for Python (pdb, debugpy), Go (delve), Rust (lldb), and Node.js, including container debugging (kubectl debug, ephemeral containers) and production-safe debugging techniques with distributed tracing and correlation IDs. Use when setting breakpoints, debugging containers/pods, remote debugging, or production debugging.
Как установить скилл debugging-techniques?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл debugging-techniques запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic