[英]How to debug a Thunderbird addon/extension's JavaScript
I want to develop a Thunderbird 12 addon. 我想开发一个Thunderbird 12插件。 I have written a simple JS function.
我写了一个简单的JS函数。 (File: "chrome\\content\\myApp.js").
(文件:“chrome \\ content \\ myApp.js”)。 This file is called by a xul-'onclick'-event.
该文件由xul-'onclick'事件调用。 I have packed my addon as a .xpi file and then I have installed it.
我已将我的插件打包为.xpi文件,然后我安装了它。 (All ok, it's working!)
(好的,它正在工作!)
Now I'd like to debug my JS functions. 现在我想调试我的JS函数。 But I can't find a working JS Debugger.
但我找不到一个有效的JS Debugger。 I have tried this addons:
我试过这个插件:
Happily we once again have a debugger for Thunderbird! 令人高兴的是,我们再次拥有Thunderbird的调试器! You need a newer/nightly version, but hanks to Philipp Kewisch's summer of code project we can use the Firefox debugger to remotely debug Thunderbird.
你需要一个更新/每晚的版本,但是对于Philipp Kewisch夏天的代码项目,我们可以使用Firefox调试器来远程调试Thunderbird。 More details at the following links: http://kewisch.wordpress.com/2013/09/22/thunderbird-developer-tools-wrapup/ http://kewisch.wordpress.com/2013/06/13/the-thunderbird-remote-debugger-is-alive/ https://bugzilla.mozilla.org/show_bug.cgi?id=876636
更多详情请访问以下链接: http : //kewisch.wordpress.com/2013/09/22/thunderbird-developer-tools-wrapup/ http://kewisch.wordpress.com/2013/06/13/the-thunderbird -remote-debugger-is-alive / https://bugzilla.mozilla.org/show_bug.cgi?id=876636
If you are really committed to TB12, you can debug on the nightly then test on TB12. 如果您真的致力于TB12,您可以在每晚调试然后在TB12上进行测试。
Unfortunately there's no such thing as a decent debugger for chrome (addons) javascript. 不幸的是,没有像chrome(插件)javascript那样体面的调试器。 Chromebug has been long abandoned, venkman doesn't work, addon authors are a little bit stranded there.
Chromebug一直被抛弃,venkman不起作用,插件作者有点滞留在那里。 A new debugging API called JSD2 is in the works at Mozilla, but it looks from the wiki that it's mostly targeted at content (webpage) javascript, not chrome (addons) javascript, at least not in the short term.
一个名为JSD2的新调试API正在Mozilla中运行,但它从维基看起来它主要针对内容(网页)javascript,而不是chrome(插件)javascript,至少在短期内不会。
Fortunately, a very recent effort seems to have paid off: there's now a way to execute easily small snippets of javascript in a decent console-like window. 幸运的是,最近的努力似乎已经得到了回报:现在有一种方法可以在类似控制台的窗口中轻松执行javascript的小片段。 See http://mikeconley.ca/blog/2012/05/11/scratchpad-ported-to-thunderbird-kinda/ for the details :).
有关详细信息,请参见http://mikeconley.ca/blog/2012/05/11/scratchpad-ported-to-thunderbird-kinda/ 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.