Debugging workflow
Whatever tool we choose, there are a few steps we should take when we start to debug. If it’s not our own bug, but a colleague or user indicates that there’s a bug, the first step is always to reproduce it. Then again, I typically also do this when it’s my own bug.
Reproducing the bug is not necessarily difficult. It means running the code again and seeing whether you indeed get the same wrong output. If you don’t, it’s important to make sure that you are running the code in the same way as when you or your colleague got the problem.

Then the next step is to hypothesize the cause of the bug. What could possibly be causing this error to occur? Depending on the problem, the steps are different. If you have a traceback, you start by reading that and going over the type of error and the line on which it went wrong. If you don’t see it there, you can look at the line that was called before that and go back until...