基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/glawson6/jaiclaw --skill python-debugpy命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
This skill should be used when the user asks to "draw a diagram", "show a status box", "render ASCII art", "make a callout", "wrap text in a box", "plot these numbers", or any request involving boxed messages, two-box-and-arrow diagrams, scatter plots, or tables rendered as ASCII. Uses JBang to invoke the JaiClaw ASCII renderer; do not hand-draw borders character-by-character.
Render domain objects (events, tasks, tickets, orders, …) as framed monospaced ASCII via the render_response tool. Follow the fidelity rules exactly — do not paraphrase, transliterate, forge, or strip borders from tool output.
End-to-end validation of JaiClaw bootstrap, scaffolding, build, runtime, and Docker CLI images. Tests quickstart.sh, project creation from Maven releases, provider connectivity, CLI launcher, and Docker image builds.
| name | python-debugpy |
| description | Python debugging with pdb, debugpy, and remote attach |
| alwaysInclude | false |
| requiredBins | ["python3"] |
| platforms | ["darwin","linux"] |
| version | 1.0.0 |
| tenantIds | [] |
Debug Python applications using pdb (built-in), debugpy (VS Code protocol), and remote attach workflows. Covers breakpoints, post-mortem debugging, and profiling.
# Run script under pdb
python3 -m pdb script.py
# Post-mortem on crash
python3 -c "
import mymodule
try:
mymodule.run()
except Exception:
import pdb; pdb.post_mortem()
"
# Insert in source code (Python 3.7+)
breakpoint()
# Or explicitly
import pdb; pdb.set_trace()
| Command | Action |
|---|---|
n / next | Step over |
s / step | Step into |
c / continue | Continue execution |
r / return | Continue until function returns |
l / list | Show source around current line |
ll | Show full source of current function |
p expr | Print expression value |
pp expr | Pretty-print expression value |
w / where | Print stack trace |
u / up | Move up one frame |
d / down | Move down one frame |
b file:line | Set breakpoint |
cl num | Clear breakpoint |
commands num | Set commands to run at breakpoint |
interact | Start interactive interpreter in current frame |
# Break only when condition is true
import pdb; pdb.set_trace() if len(items) > 100 else None
# In pdb prompt:
# b 42, x > 10 # break at line 42 when x > 10
pip install debugpy
# Listen for attach (pauses until client connects)
python3 -m debugpy --listen 0.0.0.0:5678 --wait-for-client script.py
# Listen without waiting
python3 -m debugpy --listen 5678 script.py
# Attach to running process by PID
python3 -m debugpy --listen 5678 --pid 12345
import debugpy
# Start debug server
debugpy.listen(("0.0.0.0", 5678))
print("Waiting for debugger attach...")
debugpy.wait_for_client()
debugpy.breakpoint()
# Now run your code
main()
Connect any DAP-compatible client to the debug server:
{
"type": "debugpy",
"request": "attach",
"connect": { "host": "localhost", "port": 5678 },
"pathMappings": [
{ "localRoot": "${workspaceFolder}", "remoteRoot": "/app" }
]
}
# Profile script and sort by cumulative time
python3 -m cProfile -s cumulative script.py
# Save profile data
python3 -m cProfile -o profile.stats script.py
# Analyze saved profile
python3 -c "
import pstats
p = pstats.Stats('profile.stats')
p.sort_stats('cumulative')
p.print_stats(20)
"
pip install line_profiler
# Decorate functions with @profile, then:
kernprof -l -v script.py
pip install memory_profiler
# Decorate functions with @profile, then:
python3 -m memory_profiler script.py
# Django with debugpy
python3 -m debugpy --listen 5678 manage.py runserver --noreload
# Drop into pdb on failure
python3 -m pytest --pdb
# Drop into pdb on first failure then quit
python3 -m pytest -x --pdb
# Use debugpy with pytest
python3 -m debugpy --listen 5678 -m pytest tests/
# Expose debug port
EXPOSE 5678
CMD ["python3", "-m", "debugpy", "--listen", "0.0.0.0:5678", "app.py"]
breakpoint() over import pdb; pdb.set_trace() for Python 3.7+.--wait-for-client when you need to debug startup code.--noreload with Django to avoid debugger disconnects on file changes.PYTHONBREAKPOINT env var — it controls what breakpoint() calls.