简体   繁体   English

从引导的Firefox4扩展调试打印

[英]Debug print from a bootstrapped Firefox4 extension

I'm rewriting a Firefox extension to be bootstrapped (restartless). 我正在重写Firefox扩展以进行自举(无重启)。 I've patched rdf with a node < bootstrapped >. 我用节点<bootstrapped>修补了rdf。 Then I introduced file "bootstrap.js": 然后我介绍了文件“bootstrap.js”:

function startup(data, reason) { dump("startup") }
function void shutdown(data, reason) {}

The extension was installed visually correctly and it stopped to work (that means correctness too). 扩展程序在视觉上正确安装并停止工作(这也意味着正确性)。 But I have no clue how to debug my extension without debug prints: dump() does not work (jconsole stays empty), alert() too. 但我不知道如何调试我的扩展没有调试打印:dump()不起作用(jconsole保持为空),alert()也是如此。 I'm not sure even the function startup() had been invoked actually. 我甚至不确定函数startup()是否已被实际调用。 How to make sure? 怎么确定?

It could be that window.dump is not enabled. 可能是window.dump未启用。 See https://developer.mozilla.org/en/window.dump 请参阅https://developer.mozilla.org/en/window.dump

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM