A new safe external debugger interface for CPython
summary
PEP 768 adds a safe, zero‑overhead external debugger interface to CPython 3.14 that lets a debugger drop a script into a remote_exec box and have the interpreter run it at interpreter safe points (eval loop checks) instead of attaching with ptrace. Implementation uses proc maps + binary offsets to locate PyRuntime, process_vm_readv to inspect memory, and a small metadata struct to find the pending-script path. Tools like pdb -P already work, performance impact is negligible, Windows support is harder but implemented, and opt‑outs include an env var, -X flag, or compile‑time disable.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:57Metaphor for debugging
- 3:25Native debugging
- 8:39How it works
- 11:22Evil Loop
- 13:23PyRuntime
- 14:51procmap
- 15:46debugoffsets
- 17:44code explanation
- 19:49Python disable remote debug
- 24:30Closing remarks
- 25:17Remote exec on Windows
- 26:32Recommendations
- 28:36Performance
- 30:02Extensions
- 31:04Exception
related talks
25mLive process manipulation with Python 3.14's zero overhead debugging interface
28mWhat makes a Python debugger possible and how can we make it 100x faster
52mCombining Embedded and Interactive Python in a Debugger: A Case Study
30mPython 3.12's new monitoring and debugging API
52mCombining Embedded and Interactive Python in a Debugger: A Case Study
40mSo you think you can PDB?
39mDebugging python applications inside k8s environment
41mAdvanced Python Debugging Techniques Using GDB
