addon SDK错误获取devtools模块 [英] Addon SDK error getting devtools module
问题描述
我将这段代码添加到Addon-SDK插件中:
$ p $ var $ devtools = Cu.import( resource://gre/modules/devtools/Loader.jsm,{});
var {WebConsoleFrame} = devtools.require(devtools / webconsole / webconsole);
虽然这个工作在一个普通的(老式)插件中,用 为了澄清,我试图将这2行添加到这里: https://github.com/DavidBruant/usefulStackTrace/blob/master /lib/trackStack.js 在Addon SDK的无重启插件系统中,这是不可能的? I'm adding this code to a Addon-SDK addon: Although this works in a normal (old style) addon, with To clarify, I'm trying to add those 2 lines into here: https://github.com/DavidBruant/usefulStackTrace/blob/master/lib/trackStack.js Is this not possible within the Addon SDK's restartless addon system? A quick-and-not-so-dirty workaround
这篇关于addon SDK错误获取devtools模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! cfx run 我得到:
$ b $ pre $ ModuleNotFoundError:无法满足:require(devtools / webconsole / webconsole)from
(thefilename.js)
var {WebConsoleFrame } = devtools [require](devtools / webconsole / webconsole);
var {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
var {WebConsoleFrame} = devtools.require("devtools/webconsole/webconsole");
cfx run
I get:ModuleNotFoundError: unable to satisfy: require(devtools/webconsole/webconsole) from
(thefilename.js)
var {WebConsoleFrame} = devtools["require"]("devtools/webconsole/webconsole");