Firebug:在断点期间,无法执行console语句 [英] Firebug: During breakpoint, can't execute console statement

查看:116
本文介绍了Firebug:在断点期间,无法执行console语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Firebug中看到以下行为:



当调试器在断点上暂停时,如果我进入控制台并尝试执行语句, 输入键只会添加行而不是执行。



我试过点击 Shift + 输入 Ctrl + 输入也没有用。

解决方案

环境



我有时会在firebug(console),FireFox(dev console)和FireFox开发版控制台)。



问题



使用web控制台像alert(test),然后按回车键,但不能运行。



而不是运行它会输入一个新行,就像我按下Shift Enter 。奇怪的是,当我点击Shift Enter只是为了看看会发生什么,没有更多的新行,但代码不运行。



尝试找到一个解决方案



我重新启动了我的电脑,之后再次返回。我没有解决方案,但更多的工作(有些时候工作)。最大的问题是我不知道是什么原因造成的。可能几个小时后,我只能猜测我认为是什么问题。



我怀疑为什么会发生这种情况是开发者控制台与其正在尝试的网页断开连接调试。



如果开发工具断开连接,则无法运行代码(我的警报),因为它不知道哪个页面/标签可以运行。 / p>

解决方案



完全关闭所有Firefox窗口/标签(及其开发/ firebug windows / tabs)。这可能或可能不会将控制台与网页重新关联,从而允许代码再次运行。



免责声明



大部分时间都适用于我,如果有人(谁知道更多)可以解释为什么会发生这种情况,并提供更好的解决方案,我会变得高兴。但是直到那时,对于像我这样的问题的其他人来说,我希望这有助于。


I'm seeing the following behavior in Firebug:

When the debugger is paused on a breakpoint, if I go to the console and attempt to execute a statement, the Enter key keeps just adding lines instead of executing.

I've tried hitting Shift+Enter and Ctrl+Enter also, to no avail.

解决方案

Environment

I sometimes get this issue on firebug (console), FireFox (dev console), and FireFox developer edition (dev console).

Issue

Using the "web console" I would type something like alert("test") and hit the enter key but it would not run.

Instead of running it would enter a new line as if I hit "Shift Enter". Oddly when I hit "Shift Enter" just to see what happens, there is no more new line but the code does not run.

Attempt to find a solution

I restarted my computer, and it went away only to return again later. I don't have a solution but more of a work around (that works some of the time). The biggest issue is I don't know what causes this to happen. After may hours I can only guess what I think the issue is.

I suspect that why this happens is the developer console gets disconnected with the web page that it is trying to debugged.

If the Dev tools are disconnected, then it can not run the code (my alert) because it does not know what page/tab to run it on.

Work Around

Fully closing all Firefox windows/tabs (and its dev/firebug windows/tabs). This may-or-may-not re-associate the console with the web page allowing the code to run again.

Disclaimer

It works for me most of the time, I would be vary happy if someone (who knows more about this) could explain why this happens and a better solution. But until then for anyone else with this issue like me I hope this helps.

这篇关于Firebug:在断点期间,无法执行console语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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