Make sure under the Tools menu, Internet Options, Advanced tab:
With those settings when there is a JavaScript error a window like this should appear:
If you check the box Use the built-in script debugger in Internet Explorer a window with error highlighted should come, something like this: