To debug javascipt code in the browser you may:
1. Uncheck the option Disable script debugging in the advanced tab of internet options IExplorer.
2. Insert the keyword "debugger" in your javascipt code.
The debugger will be activated in this line.
This technique is usefull to debug client javasript code in asp.net pages too.