How can I debug an IE8 crash?
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 t开发者_如何学Gohrough 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
Have a look at JScript Debugger in Internet Explorer 8.
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'); };
}
精彩评论