home / skills / pluginagentmarketplace / custom-plugin-python / debugging
This skill helps you master Python debugging with pdb and IDE tools, enabling efficient issue resolution, profiling, and robust log-based troubleshooting.
npx playbooks add skill pluginagentmarketplace/custom-plugin-python --skill debuggingReview the files below or copy the command above to add this skill to your agents.
---
name: Debugging
description: Python debugging techniques, pdb, and IDE debugging tools
version: "2.1.0"
sasmp_version: "1.3.0"
bonded_agent: 04-testing-quality
bond_type: PRIMARY_BOND
# Skill Configuration
retry_strategy: exponential_backoff
observability:
logging: true
metrics: issue_resolution_time
---
# Python Debugging Skill
## Overview
Master Python debugging using pdb, IDE debuggers, and advanced troubleshooting techniques.
## Topics Covered
### pdb Debugger
- Basic pdb commands
- Breakpoint() function
- Post-mortem debugging
- Remote debugging
- pdb++ enhancements
### IDE Debugging
- VS Code debugger
- PyCharm debugging
- Breakpoint conditions
- Watch expressions
- Call stack navigation
### Logging
- logging module setup
- Log levels and handlers
- Structured logging
- Log aggregation
- Debug logging strategies
### Profiling
- cProfile usage
- line_profiler
- memory_profiler
- py-spy for production
- Flame graphs
### Error Analysis
- Traceback analysis
- Exception chaining
- Context managers for debugging
- Sentry integration
- Error monitoring
## Prerequisites
- Python fundamentals
- Exception handling
## Learning Outcomes
- Debug effectively with pdb
- Profile performance issues
- Set up proper logging
- Analyze production errors
This skill teaches practical Python debugging using pdb, IDE debuggers, logging, profiling, and error analysis. I guide you from basic breakpoint debugging to production-safe tools like py-spy and structured logging. You will learn to reproduce, inspect, and fix bugs faster and with less disruption to production.
I cover core pdb commands, breakpoints(), post-mortem and remote debugging, plus enhancements like pdb++. I walk through IDE workflows for VS Code and PyCharm: conditional breakpoints, watches, and call stack navigation. I also teach logging setup, profiling with cProfile/line_profiler/memory_profiler, and techniques for analyzing tracebacks and integrating error monitoring.
Do I need an IDE to debug effectively?
No. pdb and py-spy provide powerful CLI debugging and profiling; IDEs add convenience but are optional.
Is print() debugging ever acceptable?
Yes for quick checks, but structured logging and breakpoints scale better and are safer in production.