EuroPython 2025

A new safe external debugger interface for CPython
2025-07-17 , Forum Hall

Have you ever needed to debug a Python application in production without stopping it? While tools like GDB make this straightforward for C/C++, Python developers face unique challenges when attaching debuggers to live processes. This talk introduces PEP 768, a new proposal for Python 3.14 that adds a safe, zero-overhead debugging interface to CPython.

We'll explore how the current landscape forces debugging tools to use unsafe methods that can crash interpreters and corrupt memory. Then, we'll detail how PEP 768 solves these problems by introducing a cooperative debugging protocol that works with the interpreter rather than against it.

You'll learn why attaching debuggers to Python processes is uniquely challenging, how PEP 768 enables safe debugging through interpreter cooperation, the technical details of the zero-overhead implementation, real-world applications, including live process attachment for pdb and all about the security considerations and safeguards.

This talk will be particularly valuable for tool developers, system administrators, and anyone interested in Python internals or debugging techniques. You'll walk away understanding the challenges of live process debugging and how PEP 768 elegantly solves them.


Expected audience expertise:

Advanced

Pablo Galindo Salgado works in the Python Infrastructure team at the Software Infrastructure department at Bloomberg L.P. He is a CPython core developer and a Theoretical Physicist specializing in general relativity and black hole physics. He is currently serving on the Python Steering Council and he is the release manager for Python 3.10 and 3.11. He also has a cat who doesn’t code.