Debugging

Developers often find themselves in situations where the code they've written is not working quite right. When that happens, a developer debugs their code by instrumenting, executing and inspecting the code to determine what state of the application does not match the assumptions of how the code should be correctly running.

Why is debugging important?

There are bugs in every modest sized or larger application. Every developer has to learn how to debug code in order to write programs that work as correctly as time and budget allow.

Debugging resources

  • Debugging your Python code walks through a scenario where pdb can be used to find a defect in a block of Python code.

  • pdb - Interactive Debugger is featured on the Python Module of the Week blog and has some great detail on using the program effectively.

  • Python debugging tools provides a list of tools such as pdb and its derivatives ipdb, pudb and pdb++ along with how they can be used in the hunt for defects.

  • Debugging in Python elaborates on what pdb does and how it can be used.

What's next after testing your application?

What code metrics should I be aware of?

Can I automate testing and deployments for my app?

How do I create unit tests?

Sign up here to receive a monthly email with major updates to this site, tutorials and discount codes for Python books.


Matt Makai 2012-2017