Dark theme

Debugging


The first bug; click for more info. File from Wikimedia Commons: http://en.wikipedia.org/wiki/File:H96566k.jpg

Debugging is the process of finding 'bugs' (problems) in your code and fixing them. There are broadly two kinds of issues with code in terms of getting it running: bugs that stop the code running, and bugs that stop code doing its job once it is running. The hardest bugs to find are those that don't break (stop) the program, but instead silently muck up what you are trying to do.

For an explanation of common messages from Python about issues stopping code running, see this list of messages.

For basic techniques useful for quick debugging, see this page of ideas.

For an extensive set of tutorials on debugging, see these debugging tutorials and practice. These are designed to parallel the lectures on the course.

NB: Some of the first two pages won't make sense until you reach the half-way point in the course.