The Art of Debugging
Debugging can be a chore or it can be an art. Sometimes it's fun, and sometimes it's incredibly boring. Becoming good at debugging is a lot like becoming good at chess. You can read books about it, but it just takes time and experience to get really good. Over time, you'll see common patterns of erroneous behavior that occur over and over. As you become familiar with these patterns, you get better at spotting them.
Some of the most common bug patterns are
Development error— Either a typo or a straightforward error in coding (forgetting to increment a counter, storing the wrong value, and so on).
Environmental error— The program behaves differently on different computers or in different browsers, or the program fails after ...