$$ \newcommand{\tp}{\thinspace .} $$




Debugging in Python

Hans Petter Langtangen [1, 2]

[1] Center for Biomedical Computing, Simula Research Laboratory
[2] Department of Informatics, University of Oslo

Mar 23, 2015

Table of contents

Using a debugger
How to debug
      A recipe for program writing and debugging
      Application of the recipe
      Getting help from a code analyzer

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.

This chapter is taken from book A Primer on Scientific Programming with Python by H. P. Langtangen, 4th edition, Springer, 2014.

Read »