you can bring up the debugger in internet explorer if you have at least version 8. You simply press the F12 button. Then go to the Script tab and next to the Start Debugging button you will see the scripts, your script will probably be well down in the list.
Also you should set internet explorer options to untick the disable script debugging.
These blog tells you how to set it up
The error checking was very useful because it told you if there were syntax errors and you can see what line an error occured.