Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/HezaoHezao/poirot --skill python-debugpy명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | python-debugpy |
| description | Debug Python: pdb REPL + debugpy remote (DAP). |
| allowed-tools | ["bash","read_file"] |
| enabled | true |
| related-skills | ["systematic-debugging","node-inspect-debugger"] |
| license | MIT |
| author | Adapted from hermes-agent (Nous Research, MIT) |
Three tools, picked by situation:
| Tool | When |
|---|---|
breakpoint() + pdb | Local, interactive, simplest. Add breakpoint() in source, run, get REPL. |
python -m pdb | Launch script under pdb with no source edits. |
debugpy | Remote / headless / attach to running process. DAP, scriptable. |
Start with breakpoint(). It's the cheapest thing that works.
Don't use for: things print() / logging.debug solve in under a minute,
or things pytest -vv --tb=long --showlocals already reveals.
Inside any pdb prompt ((Pdb)):
| Command | Action |
|---|---|
h / h cmd | help |
n | next line (step over) |
s | step into |
r | return from current function |
c | continue |
unt N | continue until line N |
j N | jump to line N (same function only) |
b N | set breakpoint at line N |
b file:N | set breakpoint in another file |
b func | set breakpoint at function |
cl N | clear breakpoint N |
l | list 11 lines around current |
ll | list whole function |
w / where | show call stack |
u / d | move up/down stack frame |
p expr | print expression |
pp expr | pretty-print expression |
a | print args of current function |
args | same as a |
display expr | watch expression (re-eval each step) |
interact | drop into interactive Python REPL |
breakpoint()def process(data):
result = transform(data)
breakpoint() # Execution pauses here, pdb REPL opens
return result
Run normally:
python script.py
# Pauses at breakpoint(), (Pdb) prompt appears
python -m pdb (no source edits)python -m pdb script.py
# Starts paused at first line
Drop into pdb at the exact exception site:
import pdb, traceback
try:
main()
except Exception:
traceback.print_exc()
pdb.post_mortem()
Or:
python -m pdb -c continue script.py
# Runs until exception, then drops to pdb at the crash
For long-running processes or headless debugging:
# Install
pip install debugpy
# Option 1: Launch with debugpy
python -m debugpy --listen 5678 --wait-for-client script.py
# Option 2: Inject into running code
import debugpy
debugpy.listen(5678)
print("Waiting for debugger on port 5678...")
debugpy.wait_for_client()
Attach from another terminal (DAP client):
# Using debugpy's CLI to set breakpoints + continue
python -m debugpy --connect localhost:5678 --set-breakpoint script.py:42
Or use any DAP-compatible editor (VS Code, Neovim) to attach to port 5678.
# In pdb
(Pdb) display my_list
# Each step, pdb re-evaluates and shows the value if changed
# In source
breakpoint() if condition else None
# Or in pdb
(Pdb) b 42, x > 100 # Break at line 42 only when x > 100
import debugpy
# In the subprocess code:
debugpy.listen(5679)
debugpy.wait_for_client()
# Parent can attach to port 5679
breakpoint() only
for local debugging.debugpy for multi-process debugging.w (where) to see the full async call stack.python -m pdb is more reliable than breakpoint() in some Windows terminals.--listen 5679.