Firebug-断点没有命中 [英] Firebug - Breakpoint doesn't hit

查看:94
本文介绍了Firebug-断点没有命中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在外部JS文件中设置断点,但无法始终如一地使Firebug击中断点.有时它可以工作,但大多数时候却不起作用.使它正常工作的唯一方法是打开打破所有错误"

I am setting breakpoints in an external JS file and I haven't been able to get Firebug hit the breakpoint in a consistent way. It works sometimes but most of the times it doesn't. The only way I can get it to work is by switching on "Break on all errors"

我用过调试器;声明也没有运气.

I have used the debugger; statement as well without any luck.

推荐答案

如果行号不是绿色,则似乎Firebug无法调试那部分代码,因为它超出了范围.因此,如果您使用的是$(function(){...});之类的东西. Firebug将无法访问函数和变量.

If the line numbers aren't green, it seems like Firebug cannot debug that part of code because it is out of scope. So, if you're using something like $(function () { ... }); Firebug will not be able to access Functions and variables.

这有意义吗?

此外,是否有其他功能或某些功能可能会覆盖您要调试的功能.甚至可能两次包含相同的JS文件.

Also, is it possible that some other function or something is overriding the one you're trying to debug. It's even possible if you're including the same JS file twice.

希望有帮助.

这篇关于Firebug-断点没有命中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆