如何使用 IE 8 调试 Javascript
我们如何使用 IE 8 调试 JavaScript?
更新到 IE 8 后,无法使用 Visual Studio 进行 JavaScript 调试。
How can we debug JavaScript with IE 8 ?
The JavaScript debbuging with Visual Studio doesn't work after an update to IE 8.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
今天我发现我们现在可以使用 IE 8 中集成的开发人员工具栏插件来调试 Javascript。
您可以使用监视、断点、查看调用堆栈等,类似于专业浏览器中的调试器。
您还可以在 JavaScript 代码中使用语句
debugger;
设置断点。I discovered today that we can now debug Javascript With the developer tool bar plugins integreted in IE 8.
You can use watch, breakpoint, see the call stack etc, similarly to debuggers in professional browsers.
You can also use the statement
debugger;
in your JavaScript code the set a breakpoint.您可以在调试 JScript 或使用开发人员工具调试脚本。
You can get more information about IE8 Developer Toolbar debugging at Debugging JScript or Debugging Script with the Developer Tools.
这不会帮助您单步调试代码或中断错误,但它是在所有浏览器上为您的项目获得相同调试控制台的有用方法。
这是非常仓促地组合起来的,有点草率,但它仍然很有用,并且可以轻松改进!
This won't help you step through code or break on errors, but it's a useful way to get the same debug console for your project on all browsers.
This is put together pretty hastily and is a bit sloppy, but it's useful nonetheless and can be improved easily!
我希望将此添加为马库斯·威斯汀回复的评论,但我找不到链接 - 也许我需要更多声誉?
不管怎样,谢谢,我发现这个代码片段对于在 IE 中快速调试很有用。我做了一些快速调整来解决一个让它停止工作的问题,同时自动向下滚动并使用固定定位,以便它出现在视口中。这是我的版本,以防有人觉得有用:
I was hoping to add this as a comment to Marcus Westin's reply, but I can't find a link - maybe I need more reputation?
Anyway, thanks, I found this code snippet useful for quick debugging in IE. I have made some quick tweaks to fix a problem that stopped it working for me, also to scroll down automatically and use fixed positioning so it will appear in the viewport. Here's my version in case anyone finds it useful: