Testing a program to find errors usually takes much more time than to write the code. This document is devoted to tools and good habits for effective debugging. The section Using a debugger describes the Python debugger, a key tool for examining the internal workings of a code, while the section How to debug explains how solve problems and write software to simplify the debugging process.