问题
When I resize the browser window and I hit a responsive breaking point, this (dynamic) method throws an exception at line 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.
I think what this does is manage listeners for media query evaluation changes, but the arguments contain 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?
回答1:
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+R to force a hard-reload of the page, which will clear the error
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
来源:https://stackoverflow.com/questions/20884457/ie-11-throws-exceptions-when-debugging-responsive-web-app-with-bootstrap-in-visu