Possible Duplicate:
How do you debug Javascript applications?
When there’s a bug in my javascript .js file, no error is indicated, and the file just does not load.
Is there a fast way to debug something like this?
I have to temporarily delete half the file, test it, delete another half, test it, and so on until I isolate the problem.
How can I display the error when javascript loads the page?
Try using the firebug pluggin for firefox.
You can put break point and use the step by step debug mode.
Realy helpfull.