Python Debugging

COMP1312 - Programming I | L5.3


Overview

Debugging is the process of locating and removing errors from code. It works hand-in-hand with testing:

<aside> 💡

Dijkstra's Quote

"If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with."

The best approach is to write high-quality code from the beginning, but debugging is inevitable in practice.

</aside>


Debugging Principles

Error-Locating Principles

1. Think First 🤔

2. Describe the Problem to Someone Else 💬