There are typically two kinds of bugs:
- An exception is raised and not caught.
- The code does not function properly.
The first case is usually easier to fix. The second can be more difficult as the problem can be a faulty idea or solution, a faulty implementation, or a combination of the two.
We are only concerned with the first case in what follows, but the same tools can be used to help find why the code does not do what it is supposed to.