IE 11 throws exceptions when debugging responsive Web app with Bootstrap in Visual Studio 2013

梦想的初衷 提交于 2019-12-03 15:24:47

问题


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:

  1. Load you page; it works great. Try resizing, it works great.
  2. Pull up developer tools, continue browsing your site, resize works good
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!