Your code gives an error. Or worse: it doesn't give an error, but doesn't do what you want. Welcome to the hard part of programming! What to do now?
In this talk we will talk about debugging, which includes a broad set of techniques to identify the root causes of undesired behavior in programs and eventually fix them. We will start with a theoretical introduction of the different types of debugging, we will describe a couple of techniques that you can use, and we will apply them in practice, both in Jupyter Notebook (using its new interactive debugger) and in VSCode.
- Why debugging is important
- Sources of bugs
- Types of debugging: tracing vs interactive
- Debugging is problem solving: divide and conquer, hypothesis testing
- Think of your future self
- Practical debugging in Jupyter
- Practical debugging in VSCode
- Conclusions
Ahead of the workshop, submit some code that doesn't work! To do that, open a new issue at https://github.com/astrojuanlu/workshop-debugging-python/issues/new. I will collect several examples and choose a few of them to show how to debug them.