-
Book Overview & Buying
-
Table Of Contents
Mastering Python 2E - Second Edition
By :
The most basic form of debugging is adding a simple print statement into your code to see what is still working and what isn’t. This is useful in a variety of cases and likely to help solve most of your issues.
Later in this chapter, we will show some interactive debugging methods, but those are not always suitable. Interactive debugging tends to become difficult or even impossible in cases such as:
Both interactive and non-interactive debugging methods have their merits, but I personally opt for non-interactive debugging 90% of the time, since a simple print/log statement is usually enough to analyze the cause of a problem. I find interactive debugging to be mostly helpful when writing code which uses large and complicated external libraries, where...