尝试使用Firebug在JavaScript文件中定位函数 [英] Trying to locate function in JavaScript files using Firebug

查看:65
本文介绍了尝试使用Firebug在JavaScript文件中定位函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找到这个函数调用myFooBar(),它在某些HTML中被内联引用,但是页面加载了大量的JavaScripts,并且在每个文件中搜索该函数是相当有用的。如何使用Firebug找到此函数所在的JavaScript文件?

I'm trying to locate this function call myFooBar() that is referenced inline in some HTML but the page loads tons of JavaScripts and it's quite some work to search that function in each of those files. How can I locate in which JavaScript file this function lives using Firebug?

推荐答案


  • 打开脚本选项卡。

  • 在firebug右上方的搜索框中输入您的函数名称(请参阅spyglass)。

  • 您可以使用下一个和上一个按钮在函数的出现之间跳转。

  • 文件名出现在脚本选项卡的栏中,并且每次出现都会更改。

    • Open the Script tab.
    • Type your function name in search box at top right of firebug (see spyglass).
    • You can use the next and previous buttons to jump between occurrences of the function.
    • The file name appears in the Script tab's bar, and changes for each occurrence.
    • 通过转到脚本选项卡,您只在页面上搜索js,如果您在html或css选项卡中尝试此操作,则只会在这些特定内容类型中搜索您输入文本的出现次数。

      By going to the script tab you are only searching js on the page, if you try this in the html or css tabs you will only be searching for occurrences of your entered text within those specific content types.

      这篇关于尝试使用Firebug在JavaScript文件中定位函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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