Contribute Media
A thank you to everyone who makes this possible: Read More

Understanding Python's Debugging Internals

Translations: en


This talk was presented at PyBay2019 - 4th annual Bay Area Regional Python conference. See for more details about PyBay and click SHOW MORE for more information about this talk.

Description Have you ever wondered how Python debugging looks on the inside? During this session, we’ll share how debugging actually works in Python. We’ll discuss the differences between CPython and PyPy interpreters, explain the underlying debugging mechanism and show you how to utilize this knowledge at work and up your watercooler talk game.

Abstract The mainstream and off-the-beaten-track Python debuggers out there: pdb/bdb, PyDev Debugger - Eclipse/IntelliJ, IDLE, Atom, and others.

What is the underlying tech of Python debuggers? 1. Introduce the (hard to decipher) sys.settrace function and review its public documentation 2. Provide the missing documentation for sys.settrace and explain what it actually does. 3. Show a snippet of example code and explain how to handle multithreading when debugging

CPython Performance Benchmarks. 1. Review the performance optimizations we've done to maximize sys.settrace 2. Introduce the CPython Performance Benchmarks 3. Deep-dive into these benchmarks - why they matter 4. Discuss the alternatives of sys.set_trace

Quick intro to PyPy interpreter . 1. Share the performance benchmarks for PyPy 2. Discuss our insights (

What do you do once your debugger stopped? 1. Introduce the Python frame object and inspect module 2. Share example code 3. Discuss possible use cases

Original slides:

About the speaker Liran is the Co-Founder and CTO of Rookout, the data collection and delivery company. He’s an advocate of modern software methodologies like agile, lean and devops. Liran’s passion is to understand how software actually works. When he's not thinking of code, he's usually diving or hiking

Sponsor Acknowledgement This and other PyBay2019 videos are via the help of our media partner AlphaVoice (!

#pybay #pybay2019 #python #python3 #gdb


Improve this page