Debug Python scripts with PyCharm-like capabilities: breakpoints, stepping, variable inspection, and stack navigation. Use this skill when: - User wants to debug a Python script ("debug this script", "help me debug") - User wants to set breakpoints ("set a breakpoint at line X", "break on exception") - User wants to step through code ("step through the code", "trace execution") - User wants to inspect variables ("what's the value of X", "inspect this variable", "show locals") - User wants to understand a crash ("why is this crashing", "find this bug") - User wants to see the call stack ("show the call stack", "how did we get here") - User is troubleshooting Python code behavior
View on GitHubalonw0/python-debugger-skill
python-debugger
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/alonw0/python-debugger-skill/blob/main/plugins/python-debugger/skills/python-debugging/SKILL.md -a claude-code --skill python-debuggingInstallation paths:
.claude/skills/python-debugging/# Python Debugging Debug Python scripts with breakpoints, stepping, variable inspection, and stack navigation. ## Quick Reference ```bash # Start debugging python scripts/debugger.py start script.py [args...] # Breakpoints python scripts/debugger.py break -f script.py -l 45 # Line breakpoint python scripts/debugger.py break -f script.py -l 45 -c "x>10" # Conditional python scripts/debugger.py break -e ValueError # Exception breakpoint python scripts/debugger.py breakpoints # List all # Execution python scripts/debugger.py continue # Run until next breakpoint python scripts/debugger.py step # Step into python scripts/debugger.py next # Step over python scripts/debugger.py finish # Run until return # Inspection python scripts/debugger.py locals # Local variables python scripts/debugger.py globals # Global variables python scripts/debugger.py eval "expression" python scripts/debugger.py inspect variable_name # Stack python scripts/debugger.py stack # View call stack python scripts/debugger.py up # Move up stack python scripts/debugger.py down # Move down stack # Session python scripts/debugger.py status # Check status python scripts/debugger.py quit # End session ``` ## Debugging Methodology Debug systematically, not randomly. Follow these principles: 1. **Form a hypothesis first** - Before setting breakpoints, have a theory about what's wrong 2. **Reproduce consistently** - Ensure you can trigger the bug reliably 3. **Read error messages carefully** - They often point directly to the problem 4. **Binary search for bugs** - Narrow down by halving the search space 5. **Verify assumptions** - Use `eval` to check values are what you expect 6. **Change one thing at a time** - Isolate variables to identify root cause ## Decision Framework | Situation | Approach | |-----------|----------| | Script crashes with exception | `break -e ExceptionType` → `continue` → i