Absolutely agree - bugs are definitely learning opportunities. I wrote a whole blog post about this - "4 Reasons Why Bugs Are Good For You":
1. Each bug can teach you something
2. You start to write code that is easier to debug if you have done a lot of debugging, because you know what you want to see to help the debugging effort.
3. Both you and the customer are happy when you find and fix a bug.
4. Solving problems is fun.
http://henrikwarne.com/2012/10/21/4-reasons-why-bugs-are-goo...