johnuk — 2010-03-05T09:45:18-05:00 — #1
Just a quick query. I have written a large web application which has been through unit testing on all major browsers.
No problems in all other broswers, and really no problem in FF unless firebug is enabled. This was never a problem before, ive had firebug open for months prior to the new build.
I was just wondering if anyone has experienced the same?
crmalibu — 2010-03-05T10:57:39-05:00 — #2
I have experienced bugs in firebug, which always reminds me that using it must change things. Having it enabled simply has to alter the browser environment and behavior a tiny bit.
I wouldn't be surprised if the broken code relies on time for correctness. Or maybe relied upon something unsuitable for synchronization or mutex purposes. Then again, you could say it was never really correct in the first place.
johnuk — 2010-03-05T11:00:41-05:00 — #3
Hi thanks for your reply.
I have decided to warn my users to disable Firebug (a bit like Google mail does). But I cant help but wonder if its something ive done wrong still.
crmalibu — 2010-03-05T11:27:26-05:00 — #4
Your code is probably faulty. I say this because it's far more likely than a bug in the browser or firebug.
You could do some debugging and find out what part of the code works unexpectedly.
johnuk — 2010-03-05T11:40:21-05:00 — #5
Please explain why my code is faulty when it works fine in every single browser?
crmalibu — 2010-03-05T20:40:42-05:00 — #6
Observing correct behavior in limited scenarios doesn't prove code to be correct.
Anyway...it shouldn't take you very long to debug the code and find out what the problem is. Not much sense guessing about it.
johnuk — 2010-03-06T04:02:33-05:00 — #7
I really appreciate the input.
I have stepped through things this morning, and it appears that the problem arises when Ajax get requests are made.
Specifically it looks as if one click results in the call being made twice inclose succession (with firebug enabled only).
crmalibu — 2010-03-06T15:17:18-05:00 — #8
Since you have reason to believe the click event(or the code to handle the event) is sometimes firing more often than intended, I would examine that area a little closer. It's possible that it's happening whether firebug is enabled or not, but your current method of testing/examining doesn't reveal it, and the effect of it doesn't quite manifest itself all the way to the broken output.
With that said, a lot of bugs I've seen in programs that use ajax are due to reliance on time, and using global variables(or variable who just have too large of a scope).
johnuk — 2010-03-06T15:21:12-05:00 — #9
glad you replied. I was going to let you know how my debugging went. I had a think about the time issues you mentioned.
I set - setTimeout("myAjaxCallHere()", 200); On the Ajax calls in question, and that immediatly corrected the problems
There are no double calls, and everything appears to excute correctly regardless of firebug being enabled.