"The truth is rarely pure and never simple."
The best way to debug a program is to make it work.