views:

105

answers:

5

misspelling javascript function alert to alerler('hell'); and firebug doesn't report an error.

Why is that? It is enabled for localhost (or my site).

+2  A: 

Works On My MachineTM, or should I say Doesn't Work On My MachineTM

>>> alerler('test');
ReferenceError: alerler is not defined
Paolo Bergantino
+3  A: 

I'm guessing you mean you have a <script> that has a call to alerler somewhere, right? Well, Firebug only catches errors for code that gets run. ;) So if the code with the misspelled function isn't actually run after the page loads, Firebug won't catch the error. This is the only reason I can think of as to why Firebug didn't catch your error.

musicfreak
+1  A: 

Maybe your FireFox Error Console (Ctrl+Shift+J) could help you on that

Unreality
A: 

Firebug has some weird quirks sometimes like if you setup a debugger; and refresh the page without stopping the debugger, firebug well no longer work properly. Sometimes you get lucky and don't have to restart the browser.

Ballsacian1
A: 

This is very unlikely, could you have defined a function?

function alerler(text) {
    // this is a possibility!
}

Though, I would say musicfreak has the most probable reason.

alex