~/talk

Debugging Python

Talkat PyCon Sweden 2023 · 2023-11-09..11-10· [developer-experience, python]
links:none on file
slides:none on file

Immediate, practical steps: stop and breathe, confirm the code path actually runs, reproduce the bug reliably, and inspect state and stack traces step by step rather than guessing. Start with low‑friction prints (claim: print is the best first tool) using f'{var=}' and !r* for repr, then try Snoop for automatic line/state dumps, pdb/ipdb/pudb or web‑pdb for interactive stepping, and Bird’s Eye to record and inspect intermediate values across iterations. Set PYTHONBREAKPOINT=0 to avoid accidental production breakpoints and use rubber‑duck explanation to surface missing assumptions.

AI-written summary · about

  1. 0:00Introduction and mindset
  2. 1:53Fundamentals of debugging
  3. 3:20Systematic investigation
  4. 9:02Rubber duck debugging
  5. 10:20The power of printing
  6. 13:06Advanced snooping tools
  7. 14:45Python debuggers
  8. 20:09Bird's eye and other tools
  9. 22:26Recap and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.