Troubleshooting guidelines
In this short section, I'll like to give you a few tips that come from my troubleshooting experience.
Using console editors
First, get comfortable using vim or nano as an editor, and learn the basics of the console. When things break bad you don't have the luxury of your editor with all the bells and whistles there. You have to connect to a box and work from there. So it's a very good idea to be comfortable browsing your production environment with console commands, and be able to edit files using console-based editors such as vi, vim, or nano. Don't let your usual development environment spoil you, because you'll have to pay a price if you do.
Where to inspect
My second suggestion is on where to place your debugging breakpoints. It doesn't matter if you are using print
, a custom function, or ipdb, you still have to choose where to place the calls that provide you with the information, right?
Well, some places are better than others, and there are ways to handle the...