Advanced Debugging with JavaScript
JavaScript debugging is a real pain. Not only do you have the not-infrequent browser discrepancies, but the normal debugging tools aren’t fantastic. With some advanced debugging tools though, you might just figure out which ‘Object is null or does not exist’.
http://www.alistapart.com/articles/advanceddebuggingwithjavascript