PDA

View Full Version : Firebug not showing Javascript errors



stevebla
28 Sep 2009, 7:27 AM
Ext 3.0.0, Firefox 3.5, Firebug 1.4.2

Firebug displays js errors normally, up to the point where a call to Ext.Ajax.request returns (i.e. to a callback function).
The callback function executes normally, except that if there are any js errors in it, it fails silently without anything from Firebug.

I have been using ExtJS with Firebug for over a year .. and this is the first for this one ... mysterious .. and frustrating.

mjaomaha
28 Sep 2009, 8:03 AM
I have noticed in firebug that the error handler doesn't show anything when a javascript exception is thrown, (the code actually catches an exception, but then throws it and it isn't handled). An uncaught javascript error displays properly.

I haven't yet found a good way to find where the error is occurring other than to use the debugger and step through the code until it seems to go off track.

stevebla
28 Sep 2009, 8:25 AM
I think you put your finger on the problem .. there is apparently a try/catch that is enclosing the callback function call in the Ext code, but not re-throwing errors it doesn't recognize.

When I enclose my own code within a try/catch, I can display the error.

This seems like an unfortunate feature of this particular Ext code .. it would be nice if it would re-throw anything it is not specifically looking for .. and let Firebug catch it.

Thanks your your help!

carol.ext
28 Sep 2009, 12:04 PM
Have you set "Break on all Errors" in firebug?

zhegwood
28 Sep 2009, 12:09 PM
I've found too that Firebug just breaks sometimes. Doesn't seem to be the case here, but restarting Firefox generally fixes this for me.

stevebla
28 Sep 2009, 12:12 PM
Thanks Carol .. No .. I wasnt aware of that feature of Firebug .. but having just tried it, it does work.