What problem does it solve? Tracebacks and print statements often fail to reveal why a value is wrong, especially in long-running processes, subprocesses, or tests that only fail under specific conditions. This Skill provides structured recipes for interactive Python debugging with pdb and remote debugging with debugpy, so you can inspect live state, step through execution, and perform post-mortem analysis at the exact crash site. ## Core Features & Use Cases - Local pdb debugging: Drop into an interactive REPL with breakpoint(), launch scripts under python -m pdb, and use the full pdb command set (step, breakpoints, stack navigation, expression evaluation). - Remote and attach-based debugging: Use debugpy to listen on a port, wait for a client, or inject into an already-running process by PID, with remote-pdb as a terminal-friendly alternative over netcat. - Post-mortem and test debugging: Catch exceptions with pdb.post_mortem, run pytest with --pdb or --trace, and debug subprocesses like gateway daemons and worker processes. - Use Case: A long-running gateway process misbehaves and cannot be restarted cleanly. Add a debugpy listener or remote-pdb trace point, connect from another terminal, and inspect the suspended frame and pending asyncio tasks live. ## Quick Start Add a breakpoint() call at the suspect line in my Python file and show me how to inspect the local variables when execution pauses.