I have collected some of my experience on debugging numerical codes here: https://code.google.com/p/dealii/wiki/FrequentlyAskedQuestions . I don't know if that would have helped you in this particular case, but it may in others.
Wolfgang Bangerth
- 56.8k
- 60
- 120