在 IE 中调试 JavaScript

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10191099/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 00:14:48  来源:igfitidea点击:

Debugging JavaScript in IE

javascriptinternet-explorerdebuggingrequirejs

提问by Eliran Malka

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.

我正在尝试在 IE 中调试我的 JavaScript,但我不知道从哪里开始。有谁能够帮助我?我认为这只是一个小错误,但开发人员工具有点无用。

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

unexpected identifier当您访问http://songtagapp.com/时出现错误。我认为这与我用于 RequireJS的tpl!插件有关,但这就是我能说的。

回答by Eliran Malka

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(and a newer reference).
  • 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.
  • 打开 IE 开发人员工具(在浏览器中按 F12),并使用提供的 JavaScript 调试器。要更好地了解它,请参阅有关使用 JavaScript 调试器MSDN 参考(以及更新的参考)。
  • 安装Debug Bar,它为内置开发人员工具提供了扩展功能集。
  • 安装IE Tester,它模拟各种 IE 实例(版本),并使用其内置的调试栏。使用这种方法,您还可以查明特定于版本的问题。

回答by Frizz1977

You can use IE (by hitting F12 while in the browser)enter image description here

您可以使用 IE(在浏览器中按 F12)在此处输入图片说明

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明