When writing a program, making sure it works the way it’s supposed to is a crucial part of the process. This means you have to test your code, and you almost always end up with bugs that you have to debug.
When you are using a IDE, you often have nice tools to do that, with the ability to place breakpoints, observe the call stack, the content of the locals… But sometimes you find yourself in situation where your program lives somewhere else and you can’t use those nice modern tools, and you have to find an other solution.
If you are using Python, have some good news for you: the standard lib comes with a basic debugger included, pdb which we’ll discover today.