Where to inspect
My second suggestion concerns where to place your debugging breakpoints. It doesn't matter if you are using print, a custom function, or pdb, 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 debugging progression that are better than others.
I normally avoid placing a breakpoint in an if clause because, if that clause is not exercised, I lose the chance of getting the information I wanted. Sometimes it's not easy or quick to get to the breakpoint, so think carefully before placing them.
Another important thing is where to start. Imagine that you have 100 lines of code that handle your data. Data comes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access