My favorite advice on debugging is from Professor Norman Matloff:
Finding your bug is a process of confirming the many things that you believe are true – until you find one that is not true.
I would add to this my own observation:
You are not truly “debugging” until you (temporarily) remove all desire to fix the problem. Investigation must be entirely devoted to finding and seeing the problem.
jmount
Data Scientist and trainer at Win Vector LLC. One of the authors of Practical Data Science with R.