AJ Fardella's 10 steps to Debugging

  1. Repeat Error. Repeatability is important to assure it's your code and not environmental software failure.
  2. Divide and Conquer. Comment Out Working sections of code to execute testing areas.
  3. Isolate Error. Use error trapping to isolate the cause of the problem. Keep in mind often there are more than one area of concern, pay attention to variables being passed as possibly inaccurate or malformed causing a failure of a function that appears to be correct.
  4. Research Fix. Use up-to date reference materials to explore the proper syntax or offer another method or approach to your process.
  5. Apply Fix.
  6. Re-Test . Repeat steps 1-4 5 times if you do not have success. After 5 times go to step 7.
  7. Get Up and Walk Away . I can't tell you how important this is. Come back after a 5 minute or so period of doing nothing related to coding or sitting at a desk. This fresh start always works.
  8. Confirmation of Functionality. Beat it up and throw uncharacteristic behavior at it to test stability.
  9. Document the process. Put your trials and the solution down on paper to help you beat a similar problem in the future and to show the path to your work product.
  10. Party like it's 1999 !!!!