热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

FirefoxFirebug扩展-冻结Javascript功能?-FirefoxFirebugExtension-FreezeJavascriptFeature?

HowcanIfreezeJavascriptinfirebugsothaticaninspectthechangesmadebyitinthehtml?If

How can I freeze Javascript in firebug so that i can inspect the changes made by it in the html? If for example i have a jQuery rollover effect and i want to inspect the html code in that point in time.

如何在firebug中冻结Javascript,以便我可以在html中检查它所做的更改?例如,我有一个jQuery翻转效果,我想在那个时间点检查HTML代码。

I believe Dreamweaver CS4 has this feature titled freeze Javascript and live code. Is there a free equivalent either in Firebug or another Firefox extension?

我相信Dreamweaver CS4有这个名为freeze Javascript和live code的功能。在Firebug或其他Firefox扩展中是否有免费的等价物?

5 个解决方案

#1


6  

By "freeze" I assume you mean debugging, and yes, Firebug definitely has that.

通过“冻结”,我认为你的意思是调试,是的,Firebug肯定有这个。

First you have to go into the Script tab on Firebug. If Script is disabled on the site, enable it.

首先,您必须进入Firebug上的“脚本”选项卡。如果在站点上禁用了脚本,请启用它。

Now, go to the dropdown and select which Javascript file you want to debug. This is typically either the page itself with inline Javascript, or a linked page. Find the line of code you want to freeze on, and click to the left of the line numbers. You'll see a red dot appear - this dot denotes that the code will freeze there during execution. Once the code is there, you can access the current HTML by going to the "HTML" tab. You'll also see the icons in the top-right corner of Firebug's Script pane light up, allowing you to either continue execution, step over, step into, or step out of each line of code, observing HTML changes for each line executed.

现在,转到下拉列表并选择要调试的Javascript文件。这通常是具有内联Javascript的页面本身或链接页面。找到要冻结的代码行,然后单击行号左侧。你会看到一个红点出现 - 这个点表示代码将在执行期间冻结。代码存在后,您可以通过转到“HTML”选项卡来访问当前的HTML。您还会看到Firebug脚本窗格右上角的图标亮起,允许您继续执行,跳过,步入或逐步退出每行代码,观察每行执行的HTML更改。

Note that Firebug lets you step through code line-by-line, which means that minimized Javascript files (wherein all the code is compacted onto one line) are absolutely awful for debugging, because you can't tell where Firebug is. So for debugging purposes, I highly recommend getting the non-minimized versions of files.

请注意,Firebug允许您逐行逐步执行代码,这意味着最小化的Javascript文件(其中所有代码都压缩到一行)对于调试来说是非常糟糕的,因为您无法分辨Firebug的位置。因此,出于调试目的,我强烈建议您获取非最小化版本的文件。

If you need more help, I suggest checking out the Firebug documentation, which has some good guides.

如果您需要更多帮助,我建议您查看Firebug文档,其中包含一些很好的指南。

#2


6  

Break on mutate (the pause button when the html tab is selected) is the closest thing I can find to this feature. It will pause the next time something is changed. It's just one off of what you want, but could be useful.

mut on mutate(选择html选项卡时的暂停按钮)是我能找到的最接近此功能的东西。它会在下次更改时暂停。这只是你想要的一个,但可能有用。

#3


2  

not exactly firefox function, but appears close enough (at least in the way I understand the question):

不完全是firefox功能,但看起来足够接近(至少在我理解问题的方式):

  1. Get CheatEngine
  2. 得到CheatEngine
  3. Open firefox process
  4. 打开firefox进程
  5. Check "enable speedhack"
  6. 检查“启用speedhack”
  7. Set speed to 0
  8. 将速度设置为0
  9. Apply
  10. 应用
  11. All scripts are now effectively paused
  12. 现在所有脚本都已暂停

You can test this on a Javascript clock here.

你可以在这里的Javascript时钟测试这个。

I'm kind of dissapointed that noone has created a plugin for firefox, which would do the same.

我有点失望,没有人为firefox创建了一个插件,它会做同样的事情。

#4


0  

In the Script tab of Firebug, you can set break points in Javascript that will allow you to step through code, set watches, and do other things you would in other debuggers. You can also switch to the HTML tab and see what changes have been made while Javascript is "frozen."

在Firebug的Script选项卡中,您可以在Javascript中设置断点,这将允许您逐步执行代码,设置监视以及执行其他调试程序中的其他操作。您还可以切换到HTML选项卡,看看在Javascript被“冻结”时所做的更改。

#5


0  

In Firebug, go to the script tab. On the top, you can see:

在Firebug中,转到脚本选项卡。在顶部,您可以看到:

Inspect | all | 

Click on to choose the file that contain the Javascript you want to track. Once you have selected your file, click on a line number to put a brea kpoint (a big red dot will appear).

单击以选择包含要跟踪的Javascript的文件。选择文件后,单击行号以放置一个brea kpoint(将出现一个大的红点)。

You can put several break points in different files. The break point will not disappear if you refresh the page (F5).

您可以在不同的文件中放置几个​​断点。如果刷新页面,断点不会消失(F5)。

This tutorial should help you as well.

本教程也应该对您有所帮助。


推荐阅读
  • Explore how Matterverse is redefining the metaverse experience, creating immersive and meaningful virtual environments that foster genuine connections and economic opportunities. ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • 1.如何在运行状态查看源代码?查看函数的源代码,我们通常会使用IDE来完成。比如在PyCharm中,你可以Ctrl+鼠标点击进入函数的源代码。那如果没有IDE呢?当我们想使用一个函 ... [详细]
  • 本文详细介绍了 Dockerfile 的编写方法及其在网络配置中的应用,涵盖基础指令、镜像构建与发布流程,并深入探讨了 Docker 的默认网络、容器互联及自定义网络的实现。 ... [详细]
  • 本文详细介绍了Java中org.eclipse.ui.forms.widgets.ExpandableComposite类的addExpansionListener()方法,并提供了多个实际代码示例,帮助开发者更好地理解和使用该方法。这些示例来源于多个知名开源项目,具有很高的参考价值。 ... [详细]
  • 深入解析Spring Cloud Ribbon负载均衡机制
    本文详细介绍了Spring Cloud中的Ribbon组件如何实现服务调用的负载均衡。通过分析其工作原理、源码结构及配置方式,帮助读者理解Ribbon在分布式系统中的重要作用。 ... [详细]
  • 前言--页数多了以后需要指定到某一页(只做了功能,样式没有细调)html ... [详细]
  • 优化ListView性能
    本文深入探讨了如何通过多种技术手段优化ListView的性能,包括视图复用、ViewHolder模式、分批加载数据、图片优化及内存管理等。这些方法能够显著提升应用的响应速度和用户体验。 ... [详细]
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • 技术分享:从动态网站提取站点密钥的解决方案
    本文探讨了如何从动态网站中提取站点密钥,特别是针对验证码(reCAPTCHA)的处理方法。通过结合Selenium和requests库,提供了详细的代码示例和优化建议。 ... [详细]
  • 本文详细介绍了如何在Linux系统上安装和配置Smokeping,以实现对网络链路质量的实时监控。通过详细的步骤和必要的依赖包安装,确保用户能够顺利完成部署并优化其网络性能监控。 ... [详细]
  • 数据管理权威指南:《DAMA-DMBOK2 数据管理知识体系》
    本书提供了全面的数据管理职能、术语和最佳实践方法的标准行业解释,构建了数据管理的总体框架,为数据管理的发展奠定了坚实的理论基础。适合各类数据管理专业人士和相关领域的从业人员。 ... [详细]
  • 深入理解 SQL 视图、存储过程与事务
    本文详细介绍了SQL中的视图、存储过程和事务的概念及应用。视图为用户提供了一种灵活的数据查询方式,存储过程则封装了复杂的SQL逻辑,而事务确保了数据库操作的完整性和一致性。 ... [详细]
  • IneedtofocusTextCellsonebyoneviaabuttonclick.ItriedlistView.ScrollTo.我需要通过点击按钮逐个关注Tex ... [详细]
  • 本文深入探讨 MyBatis 中动态 SQL 的使用方法,包括 if/where、trim 自定义字符串截取规则、choose 分支选择、封装查询和修改条件的 where/set 标签、批量处理的 foreach 标签以及内置参数和 bind 的用法。 ... [详细]
author-avatar
爱吃肉肉的狼
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有