twitter-bootstrap 在 Visual Studio 2013 中使用 Bootstrap 调试响应式 Web 应用程序时,IE 11 引发异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20884457/
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
IE 11 throws exceptions when debugging responsive Web app with Bootstrap in Visual Studio 2013
提问by cdonner
When I resize the browser window and I hit a responsive breaking point, this (dynamic) method throws an exception at line 3:
当我调整浏览器窗口大小并遇到响应断点时,此(动态)方法在第 3 行抛出异常:
window.__BROWSERTOOLS_CONSOLE_SAFEFUNC = function (fn) {
var returnFn = function () {
return fn(arguments);
};
return returnFn;
}
Unhandled exception at line 5, column 25 in eval code
0x80004005 - JavaScript runtime error: Unspecified error.
eval 代码中第 5 行第 25 列的未处理异常
0x80004005 - JavaScript 运行时错误:未指定的错误。
I think what this does is manage listeners for media query evaluation changes, but the argumentscontain a bunch of methods that I did not try to analyze further. I have to click away about two dozens of these errors before I can continue.
我认为这样做是为了管理媒体查询评估更改的侦听器,但参数包含一堆我没有尝试进一步分析的方法。在我继续之前,我必须点击大约两打这样的错误。
When the browser is not attached to the debugger, it works fine. Is anybody else experiencing this, and can I turn it off?
当浏览器未连接到调试器时,它工作正常。有没有其他人遇到过这种情况,我可以关闭它吗?
采纳答案by Brian Clifton
I was experiencing this too and it drove me nuts... Here are steps to reproduce:
我也遇到了这种情况,这让我发疯了……以下是重现的步骤:
- Load you page; it works great. Try resizing, it works great.
- Pull up developer tools, continue browsing your site, resize works good
- Hide the developer tools.. resize.. CRAP, error
- 加载您的页面;它很好用。尝试调整大小,效果很好。
- 拉起开发者工具,继续浏览您的网站,调整大小效果很好
- 隐藏开发者工具.. 调整大小.. 废话,错误
Something about the page (Bootstrap's CSS or JS) freaks out when you hide the debugger. Luckily the fix is easy, just push CTRL+Rto force a hard-reload of the page, which will clear the error
当您隐藏调试器时,有关页面的某些内容(Bootstrap 的 CSS 或 JS)会吓坏了。 幸运的是修复很简单,只需按 CTRL+R强制重新加载页面,这将清除错误
I guess the preventative step (so you don't have to hold down ESC to clear the alerts) would be to CTRL+R each time you hide the F12 tools
我想预防性步骤(因此您不必按住 ESC 来清除警报)是每次隐藏 F12 工具时按 CTRL+R

