Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nicole Zuckerman - The Glory of pdb's set_trace

Nicole Zuckerman - The Glory of pdb's set_trace

Everyone needs to debug code, and it can take up a non-trivial portion of our time to wait for code to complete execution and write print messages to stdout. There’s one function in particular in the python debugger (pdb) library that can give you a much clearer understanding of what’s going on in your code, much more quickly; pdb.set_ trace(). In this talk, we’ll identify the most useful things you can do when you use set trace, that can make debugging exponentially more efficient and enjoyable.

https://us.pycon.org/2017/schedule/presentation/753/

PyCon 2017

May 21, 2017
Tweet

More Decks by PyCon 2017

Other Decks in Programming

Transcript

  1. What’s so great about set_trace()? 1. Inspect contents of variables

    during real-time execution 2. Traverse call frames 3. Travel through execution order 4. Change live code during execution