Adrian Grigore
Adrian Grigore

Reputation: 33318

Firebug "break on all errors" feature breaks much too often

When switching on Firebug's "Break on all Errors" mode in the console, it breaks on all kinds of errors which would actually not cause a real problem, even "assignment to undefined variable".

This results in lots of breaks inside jQuery and various jQuery UI plugins. It's so bad that I cannot use this feature at all, even though it would make debugging much less bothersome.

Am I the only one having this problem? If not, is there any workaround?

Upvotes: 2

Views: 482

Answers (1)

Nick Craver
Nick Craver

Reputation: 630607

These are legitimate breaks you're seeing...for instance something like this:

undefinedVarName = "something";

Is not technically legal, and actually won't work in strict mode...you need to define a variable, even if it's at a higher scope before you use it, this is both good practice and...well...the correct way to do things.

The libraries themselves I've not come across the breaks you describe. Plugins? sure, if they're not well written they'll throw errors...you can either fix them or deal with it, but it's Firebug's job to complain about badly written JavaScript, and it's doing just that.

Upvotes: 1

Related Questions