简体   繁体   English

Firebug的“打破所有错误”功能经常中断

[英]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". 在控制台中打开Firebug的“所有错误中断”模式时,它会中断所有实际上不会引起实际问题的错误,即使是“分配未定义的变量”也是如此。

This results in lots of breaks inside jQuery and various jQuery UI plugins. 这导致jQuery和各种jQuery UI插件内部大量中断。 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? 如果没有,是否有任何解决方法?

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. 当然,如果编写得不好,它们会抛出错误...您可以修复它们或对其进行处理,但是Firebug的工作是抱怨JavaScript编写不佳,而这样做正是在这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM