用于 Firefox 扩展开发的调试工具
我正在为客户端调试 FF 扩展(3500 行)。我有一个单独的开发配置文件,其中只有 firebug && 扩展开发者扩展可以工作。
1.- 在过去的两年里,我为 FF 开发了几个扩展。我记得我使用Firebug的console.debug/trace进行调试。现在,Firebug 1.6.2 控制台未定义。有什么建议可以解决这个问题吗?
2.- 昨晚我安装了 console2(普通错误控制台的升级),它可以很好地帮助自定义函数,例如:
函数调试(aMsg) {
setTimeout(function() { throw new Error("[debug] " + aMsg); }, 0);
}
Firebug.console.debug 更优越。请提供有关调试 FF 扩展的替代技术的建议。
I am debugging a FF extension for a client (3500 lines). I have a separated development profile with just firebug && extension developer extensions to work.
1.- I had developed a couple of extensions for FF some time in the previous 2 years. I remember that I used Firebug's console.debug/trace for debugging. Now, with Firebug 1.6.2 console is not defined. Any advise to fix this?
2.- Last night I installed console2 (an upgrade for the normal error console) that can help pretty well with a custom function like:
function debug(aMsg) {
setTimeout(function() { throw new Error("[debug] " + aMsg); }, 0);
}
But Firebug.console.debug is superior. Please advise about alternative techniques for debugging FF extensions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最近的 Firebug 版本包含一个出色的日志/跟踪组件,可在调试扩展时使用,使用如下代码。
要启用此日志记录,请使用
about:config
创建首选项,将extensions.myextension.DBG_MINE
设置为 true。您可以在 http://www.a href="http://www.softwareishard.com/blog/firebug/tracing-console-for-firebug/" rel="nofollow">http://www. softwareihard.com/blog/firebug/tracing-console-for-firebug/ 。对于更高级的调试,值得检查 Chromebug,它允许您检查 XUL 接口并调试扩展代码和 Venkmann,它只是一个调试器,但我发现它比等待 Chromebug 启动要快得多。
Recent Firebug releases include an excellent log/trace component to use when debugging an extension, use code like the following.
To enable this logging, create a preference using
about:config
forextensions.myextension.DBG_MINE
set to true. You can find more information, albeit slightly outdated at http://www.softwareishard.com/blog/firebug/tracing-console-for-firebug/ .For more advanced debugging, it's worth checking out Chromebug, which lets you inspect XUL interfaces and debug extension code and Venkmann, which is just a debugger, but which I've found to be much faster than waiting for Chromebug to start up.