Debugging JavaScript in IE

2019-01-24 01:14发布

问题:

I am trying to debug my JavaScript in IE but I have no idea where to start. Can anybody help me? I think it's only a small error, but the developer tools are a bit useless.

An unexpected identifier error comes up when you go to http://songtagapp.com/. I think it's something to do with the tpl! plugin I am using for RequireJS, but that's all I can tell.

回答1:

Several options:

  • Open the IE developer tools (by hitting F12 while in the browser), and use the provided JavaScript debugger. To get to know it better, see the MSDN reference on using the JavaScript debugger.
  • Install Debug Bar, which provides an extended feature-set to the built-in developer tools.
  • Install IE Tester, which emulates various IE instances (versions), and use its built-in Debug Bar. With that approach, you can also pin-point version-specific problems.


回答2:

You can use IE (by hitting F12 while in the browser)