tags:

views:

38

answers:

3

I missed a "=", should be:

if(maxi - 1 == i)...

but firebug didn't report anything.

And it took quite a while for me to found it.

Is it a bug of firebug?

A: 

Firebug is not necessarily the be-all-end-all of code problems. It is only a tool to help you find bugs. It's impossible to write a tool to find every single bug in a program (if only...).

Amber
+1  A: 
thephpdeveloper
Did you try your screenshot?
Shore
that was what i screenshot on my desktop after i saw your question.
thephpdeveloper
The error code was in a .js file,then included into .html .Did you try this use case?
Shore
hi Shore, i've done according to what you've described. please see the Edited portion.
thephpdeveloper
A: 

To be fair, nothing in your toolbox found it -- why place the blame only on Firebug? You missed it, your text editor missed it, and your unit tests missed it, at least.

For example, if I type that expression in my editor, it's underlined in orange, and the status bar says:

Test for equality (==) mistyped as assignment (=)? (parenthesize to suppress warning)

Why wait until your code gets to your web browser to see if it worked? There are many steps before that which are great for verification and testing. The sooner you identify problems, the easier they are to fix.

Alec
Take it easy,buddy.It has nothing to do with blame but a bug discovery.
Shore