如何调试 IE8 崩溃?

发布于 2024-09-14 16:10:20 字数 1088 浏览 0 评论 0原文

有没有好的方法来调试 IE8 崩溃的原因?我们有一个网站,有一个简单的 AJAX 功能:

  • 一个带有相应按钮的文本框,onclick 事件触发 JS 事件。
  • JS 事件调用 .NET 服务(代码如下)

该代码在兼容模式下运行的 FF、Chrome、Opera、Safari、IE7、IE8 中运行良好。然而,在标准模式下运行 IE8 会导致窗口崩溃/恢复。没有错误(崩溃之前或之后),并且使用开发人员工具栏,似乎一切都已正确加载。

我已经恢复使用基本的消息框来计算浏览器崩溃的点,它似乎是在服务调用时或之后:

Service.CallService(params, onServiceSuccess, onServiceError);

<asp:ScriptManager ID="scriptMgr" runat="server"> 
    <Services>
        <asp:ServiceReference Path="<somepath>/Service.asmx" InlineScript="false" />
    </Services>
</asp:ScriptManager>

该服务非常简单,它只是返回一个字符串[]。

最终,我正在寻找一种工具,可以让我简单地捕获异常,并找出问题所在。我的猜测是,我一定做了一些不合规的事情,但理想情况下,我想要一个工具,可以让我快速诊断问题,而不必回到猜谜游戏。

非常感谢任何提示

编辑

一些进展,使用下面推荐的 JS 调试器我可以看到服务返回,并成功运行 OnServiceSuccess 调用。这个调用没有做太多事情,它使用一些 JQuery 来隐藏一些表单元素:

$('.row').filter(':not(selector)').hide();

使用调试器进一步跟踪然后将我们带入框架代码,我可以看到我们正确地处理了 XmlHttp 对象......然后在它退出后函数(调用堆栈中的最后一个)......然后它崩溃了。

去谷歌我去......

谢谢

Is there a good way to debug the cause of an IE8 crash? We have a web site that a simple AJAX feature:

  • A text box with corresponding button, onclick event fires JS event.
  • JS event calls a .NET service (code below)

The code works fine in FF, Chrome, Opera, Safari, IE7, IE8 running in compatibility mode. However running IE8 in standard mode results in crash / recovery of the window. There are no errors (before or after the crash), and using the developers toolbar it appears everything seems to have loaded correctly.

I've reverted to using basic msgbox's to work out the point at which the browser crashes, and it seems to be on or after the service call:

Service.CallService(params, onServiceSuccess, onServiceError);

<asp:ScriptManager ID="scriptMgr" runat="server"> 
    <Services>
        <asp:ServiceReference Path="<somepath>/Service.asmx" InlineScript="false" />
    </Services>
</asp:ScriptManager>

The service is quite simple, it simply returns a string[].

Ultimately I am looking for a tool that will allow me to simply catch the exception, and work out where the problem is. My guess is that I must be doing something non-compliant, but ideally I would like a tool that would allow me to quickly diagnose the problem, without reverting to guessing games.

Any tips are much appreciated

EDIT

Some progress, using the JS debugger recommended below I can see that the service returns, and runs through the OnServiceSuccess call successfully. This call does not do much, it uses some JQuery to hide some form elements:

$('.row').filter(':not(selector)').hide();

Tracing through further with the debugger then takes us into the framework code, I can see we correctly dispose the XmlHttp object..... and then after it exits the function (the last in the call stack).... and then it crashes.

Off to google I go....

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

作业与我同在 2024-09-21 16:10:20

对于那些仍然来看这个答案的人,我们最近在 IE9 中遇到了类似的问题。

我不确定 IE8 的行为是否仍然会发生这样的情况,但调试 IE 崩溃似乎确实很难(即当浏览器在 javascript 执行完成后崩溃时)。

在我们的例子中,我们必须编写一个解决方法来隐藏某些行的 IE9:

if ($.browser.msie && parseInt($.browser.version, 10) >= 9)
{
    showRow = function(row) { row.css('visibility', ''); };
    hideRow = function(row) { row.css('visibility', 'collapse'); };
}

For those who are still coming to look at this answer, we recently hit a similar problem in IE9.

I'm not sure if the IE8 behavior still happens like this, but it does seem to be really hard to debug IE crashes (i.e. when the browser crashes after the completion of the execution of the javascript).

In our case we had to write a workaround for IE9 hiding of some rows:

if ($.browser.msie && parseInt($.browser.version, 10) >= 9)
{
    showRow = function(row) { row.css('visibility', ''); };
    hideRow = function(row) { row.css('visibility', 'collapse'); };
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文