简体   繁体   English

如何使用Firefox开发人员工具检查JavaScript

[英]How to inspect javascript using Firefox developer tools

On a webpage I have a "onclick" event in a <div> element. 在网页上,我在<div>元素中有一个"onclick"事件。 Right clicking it on Firefox and inspecting it brings up the dev console. 在Firefox上右键单击并检查它会打开开发控制台。 At this point I see the function it is being called but I'm unable to lookup the code or the file that this function is pointing to, what am I missing? 在这一点上,我看到它正在被调用的功能,但是我无法查找该功能指向的代码或文件,我缺少了什么?

The body of the javascript function can be found in respective .js library. javascript函数的主体可以在相应的.js库中找到。 In developer's tool, click the tab "Debugger". 在开发人员的工具中,单击“调试器”选项卡。 It lists all .js files which might contain the function you are looking for. 它列出了所有可能包含您要查找的功能的.js文件。

Just found the answer while trying, it seems I were using # rather than @ which is used to lookup a function definition! 刚刚在尝试时找到了答案,似乎我在使用#而不是@来查找函数定义!

在此处输入图片说明

Have you tried firebug add on for Firefox? 您是否尝试过在Firefox上使用firebug add on? I think it is clearer to see it with firebug. 我认为用萤火虫看更清楚。 I'm sorry if it's not what you are looking for, because i can't suggest it on comment 很抱歉,这不是您想要的,因为我无法在评论中建议

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Web开发人员工具正确检查jquery和javascript? - How do I properly inspect jquery and javascript using web developer tools? Chrome开发者工具控制台-检查JavaScript对象 - Chrome Developer Tools console - inspect JavaScript object 在 Chrome 开发者工具中检查 Javascript Hover - Inspect Javascript Hover in Chrome Developer Tools 保存firefox开发人员工具javascript命令历史记录 - Save firefox developer tools javascript command history 如何防止用户打开铬上的开发工具(检查) - How to prevent user from opening developer tools (inspect) on chromium 如何从开发人员工具的检查元素中隐藏 html 内容? - How to hide html content from inspect element of developer tools? 如何使用Chrome开发人员工具执行一段JavaScript代码 - How to execute a piece of JavaScript code using Chrome developer tools 使用 Inspect Element 更改 FireFox 中的 javascript 代码 - Change javascript code in FireFox using Inspect Element 如何获取要在Firefox开发人员工具中调试的javascript文件的名称 - How to get the name of the javascript file you are debugging in Firefox's developer tools 如何调试Firefox开发人员工具随附的用Scratchpad编写的JavaScript? - How do I debug JavaScript written in Scratchpad that comes with Firefox Developer Tools?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM