~/talk

What makes a Python debugger possible and how can we make it 100x faster

Talkat PyCon US 2024 · 2024-05-15..05-23· [python]
name:Tian Gao
links:none on file
slides:none on file

Explains that debuggers rely on sys.settrace to receive call/line/return/exception events and inspect frame.f_locals and code objects, and shows why that global, per-function granularity creates huge overhead. Introduces PEP 669 / sys.monitoring which can enable chosen events on specific code objects and silence irrelevant lines, enabling an almost 100x speedup for breakpoints. Covers practical issues: more complex logic, backwards compatibility, and early adopters like PyCharm, VS Code backends, and coverage.py.

AI-written summary · about

  1. 0:00Introduction to debuggers
  2. 1:00Debugger foundations
  3. 4:01The sys.settrace mechanism
  4. 6:58How PDB uses trace functions
  5. 9:31Information and code execution
  6. 11:17Execution control
  7. 15:12Performance overhead issues
  8. 18:07Speeding up with sys.monitoring
  9. 23:07Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.