Chapter 10. Debugging Applications with PDB and Log Files
In this chapter, we will learn more about how to debug Python code using the Python Debugger (PDB) tool and how we can use the Python logging framework to make complex applications written in Python easier to debug when they fail.
We will also look at the technique of unit testing and how the unittest
Python module can be used to test small sections of a Python application to ensure that it is functioning as expected.
These techniques are commonly used in applications written in other languages and are good skills to learn if you are often going to be developing applications.
We will be making additions to the calculator application developed in Chapter 4, Understanding Object-oriented Programming and Threading; a copy of the code for this is included in the code for this chapter.