Debug Python issues with pdb, breakpoints, post-mortem analysis, and debugpy.
This skill material is essentially debugging documentation/prompt content with no declared secrets or fixed remote endpoints, so the overall risk is low. However, it explicitly guides local debugging, process attach, and runtime inspection via pdb/debugpy, so least-privilege use is still important, and the mismatch between the skill name and the referenced repository should be verified.
The material explicitly states that no keys or environment variables are required, and the README does not request API tokens, account credentials, or external service authentication. No direct credential collection, storage, or exfiltration mechanism is described.
No fixed remote endpoint is declared, but the README includes debugpy listen/attach usage. The examples bind to 127.0.0.1 by default and explicitly warn against exposing 0.0.0.0, which reduces risk. If users change this to external exposure, debugging session contents could become remotely accessible.
The documentation instructs use of `python3 -m pdb`, `breakpoint()`, and `debugpy --pid`, which involve launching local Python processes, attaching to existing processes, and executing/evaluating statements at breakpoints. The README itself explicitly treats `--pid` as an injection action. This gives it local code-execution and process-control characteristics, but within the material this is normal debugger functionality.
By design, the debugger can read source, call stacks, local variables, and exception context, and may modify runtime state; when attaching to a running process, access depends on the target process's privileges. No extra system permissions beyond debugging are described, but attaching to sensitive or production processes should be avoided.
Positive factors include the open-source designation, GitHub source, and very high community adoption, which normally lower supply-chain risk substantially. However, the provided repository link is `openclaw/openclaw`, which does not obviously match the skill name `python-debugpy`, and the license and maintenance status are unspecified, creating provenance ambiguity. Verify that the repository is actually the source for this skill.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "python-debugpy" skill from askskill: 1. Download https://raw.githubusercontent.com/openclaw/openclaw/main/skills/python-debugpy/SKILL.md 2. Save it as ~/.claude/skills/python-debugpy/SKILL.md 3. Reload skills and tell me it's ready
Guide me to debug this Python error with pdb and post-mortem analysis: the program exits with a ValueError. I want to inspect variable values, the call stack, and the next troubleshooting steps.
Step-by-step debugging guidance using pdb or traceback inspection, including stack frames, variables, and error context.
Help me insert breakpoint() into this Python code and explain which variables to inspect at each stop, how to step through execution, and how to tell whether the bug is in a loop or conditional branch.
Annotated example code with breakpoints plus step-by-step debugging instructions and key inspection points.
I need to remotely attach to a running Python service with debugpy. Give me a minimal working setup, including server startup parameters, listening port, security considerations, and how to connect from a local IDE.
A debugpy remote debugging setup with commands, code snippets, connection steps, and security cautions.
Use when Python code needs interactive debugging: hidden locals, confusing state mutation, failing tests, subprocesses, long-running services, or remote/headless attach.
Pick the smallest debugger that reaches the bad frame.
breakpoint(): local code, source edits ok, fastest path.python3 -m pdb: no source edit, launch from the beginning.python3 -m pdb -c continue: stop at an unhandled exception.debugpy: remote/headless process, DAP client, already-running PID, or service startup race.python3 -m pdb path/to/script.py arg1
python3 -m pdb -c continue path/to/script.py
python3 -c "import debugpy" || python3 -m pip install debugpy
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client path/to/script.py
python3 -m debugpy --listen 127.0.0.1:5678 --wait-for-client -m package.module
python3 -m debugpy --listen 127.0.0.1:5678 --pid <pid>
For source-edit attach:
import debugpy
debugpy.listen(("127.0.0.1", 5678))
debugpy.wait_for_client()
debugpy.breakpoint()
For post-mortem:
import pdb, sys
try:
run()
except Exception:
pdb.post_mortem(sys.exc_info()[2])
raise
n, s, r, c, q.w, u, d, a, l, ll.p expr, pp expr, display expr.b file.py:42, b func, b file.py:42, condition, cl <num>.!statement; full REPL: interact.debugpy in the active env; do not add it as a project dependency unless the project already wants it.127.0.0.1; do not expose 0.0.0.0 unless isolated or tunnelled.debugpy --pid as injection; avoid security-sensitive or production targets unless explicitly approved.rg -n 'breakpoint\\(|pdb\\.set_trace|debugpy\\.' --type py.PYTHONBREAKPOINT=0 disables breakpoint().Debug Node.js apps with inspect, breakpoints, heap, and CPU profiling.
Audit and harden OpenClaw hosts for security and operational health.
List chats, review message history, and send iMessage or SMS from CLI.
Summarize or transcribe URLs, videos, PDFs, and local files quickly.
Create, search, and manage Bear notes on macOS via grizzly CLI.
Automate OpenClaw nightly releases, branch maintenance, and forward-porting to main.
Debug code across languages with breakpoints, stepping, and stack trace inspection.
Let AI agents inspect debug state and control VS Code debugging.
Use a real Python debugger to inspect code, find bugs, and verify fixes.
Let AI control GDB via MCP for breakpoints, stepping, and inspection.
Debug, flash, and inspect microcontrollers through pyOCD and CMSIS-DAP probes.
Debug ARM Cortex-M targets via GDB/OpenOCD with inspection and peripheral decoding.