是否可以在不使用断点的情况下停止使用Firebug的JavaScript? [英] Is it possible to stop a javascript with Firebug without using breakpoints?

查看:174
本文介绍了是否可以在不使用断点的情况下停止使用Firebug的JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firebug是否可以通过按下按钮或键盘快捷键来停止JavaScript,而不是通过设置断点来阻止JavaScript?

Is it possible with Firebug to stop a javascript with a press of a button or a keyboard shortcut instead of stopping it by setting a breakpoint?

为什么我喜欢去做这个?
我们有一个非常动态的网站,有很多动画。如果我可以在动画做某些我想要检查的时刻停止脚本,这将是一个很大的帮助。
这将比快速断点更快。

Why would I like to do this? We have a very dynamic website with lots of animations. It would be a great help if I could just stop the scripts at the moment the animation is doing something I want to inspect. That would be a lot faster than fiddling with the breakpoints.

推荐答案

这是我做的,从运行:

window.addEventListener("keydown", function() {debugger;})

然后回到调试器选项卡。当您对焦文档并按键时,浏览器将暂停JS。

Then go back to the debugger tab. When you focus the document and press a key, the browser will pause JS.

这篇关于是否可以在不使用断点的情况下停止使用Firebug的JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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