My website keeps crashing IE, can't debug

前端 未结 5 1352
北海茫月
北海茫月 2021-01-18 02:09

I have a website that suddenly started to crash internet explorer.

The website loads and starts executing javascript but somewhere in there the machinery explodes. I

5条回答
  •  臣服心动
    2021-01-18 02:43

    (old question but important one)

    I had a very similar problem - including lots of complex VML (from Raphael), and it looked near-impossible to debug.

    Actually, it turned out the simplest low-tech approach was the best. It's an obvious approach: I'm writing here because sometimes when faced with an intimidating problem the obvious, simple solutions are the last a person thinks of.

    So, simple old-school debugging: Lots of alert("1");, alert("2"); etc before and after every remotely demanding or complex call in my code, giving super-simple reliable breakpoints that don't rely on any features (e.g. developer tools) that might themselves crash out. Then, just see which number alert you get to before it crashes - the problem must arise between that alert and the next one.

    Add more alerts until you narrow it down to the exact line. In my case, it was actually nothing to do with the complex VML - it was a for loop that, for some reason was continuing infinitely only on IE7.

提交回复
热议问题