gpt4 book ai didi

firefox - 你如何调试内部 Firefox javascript 模块?

转载 作者:行者123 更新时间:2023-12-02 04:43:25 30 4
gpt4 key购买 nike

许多 Firefox 都是作为 javascript 文件中的 javascript 模块实现的,例如:resource://gre/modules/AddonManager.jsm 如何让 javascript 调试器在 Firefox 启动时在此代码中设置断点?

(大多数 Firefox 文档和网络搜索指的是“最终用户”网页脚本的 javascript 调试,而不是内部脚本)

最佳答案

On Firefox 19 or later, it's possible to use the built-in JS debuggeron the browser itself. Go to about:config and set the following twoprefs:

devtools.chrome.enabled: true,

devtools.debugger.remote-enabled: true

After you restart the browser, you can access the Browser Debuggerthrough Tools > Web Developer > Browser Toolbox. (Note that beforeFirefox 28, this was labeled "Browser Debugger" and only the debuggerwas available, not the whole toolbox.)

https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript

关于firefox - 你如何调试内部 Firefox javascript 模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35399661/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com