10 ways to debug Python code
Christoph Deil
Are your debugging skills limited to "print", or do you sometimes think there must be a better way to figure out what's going on? I will show 10 ways to debug Python code, and share tips and tricks for effective debugging.
This talk is at the beginner level, but it is fast-paced, with the goal to give you an overview of the many options to debug Python code, and to let you find the "right tool for the job" when you encounter a problem. We will start with a quick introduction how Python executes code, focusing on stack frames and tracebacks. Then we will give an overview of different tools and techniques to debug Python if you get an error or unexpected output, ranging from pdb in the terminal to ipdb in Jupyter to the visual debugger in PyCharm and VS Code.
Christoph Deil
Affiliation: MPIK
Christoph is a researcher in gamma-ray astronomy working at the Max-Planck-Institute for Nuclear Physics in Heidelberg, Germany. He is a lead developer for Gammapy and has contributed to several scientific Python open source projects on Github, and recently he joined as co-organiser of the PyData Heidelberg meetups.