Wednesday, January 11, 2012

Debugging Tips

1.  Put in checkpoints.  alerts in Javascript or MsgBox in VB/VBA.  This will help you pinpoint where the breakdown actually occurs.


2.  Remove functions and complexities.  Unit test each part at a fundamental level.


3.  Remove variables!  Simplify your code.  It'll run faster and cleaner and your problem should reveal itself.

4.  PHP: In PHP check for semi-colons.  Annoying!

5.  Check that variable names are exact matches.  Use the CTRL+F.  It'll help.


6.  Javascript/AJAX:  Variables take time to change.  Make sure if you're using alert keys that you take the Asynchronous nature of AJAX into account.

No comments:

Post a Comment