Firefox extension开发之开发环境配置
来源:互联网 发布:1元抢购软件 编辑:程序博客网 时间:2024/06/11 01:17
官方教程:https://developer.mozilla.org/en/Setting_up_extension_development_environment
概述
1、创建开发专用的用户配置文件来运行和测试所开发的firefox扩展
2、在dev配置文件中,安装firefox扩展开发所需的扩展
3、使用dev配置文件启动应用
开发配置文件
为了避免与开发相关的设置和扩展降低扩展性能,及避免丢失个人信息,我们使用一个单独的firefox配置文件来做我们的开发工作。
在Windows中运行:
cd D:\Program Files\Mozilla Firefox\
进入firefox目录下,运行 firefox.exe -no-remote -P dev
新建配置文件dev用于firefox插件开发,下次启动时使用firefox.exe -no-remote -P "dev",变可启动开会环境。
开发参数选择
有许多开发参数设置,当激活它们时,能看到更多关于应用的信息,并且更容易debug。但是,也有可能会降低性能,因此,我们使用一个独立的配置文件来启动firefox进行开发。firefox中所有的参数都是默认的,输入about:config可以进行配置。
- javascript.options.showInConsole = true. Logs errors in chrome files to the Error Console.
- nglayout.debug.disable_xul_cache = true. Disables the XUL cache so that changes to windows and dialogs do not require a restart. This assumes you're using directories rather than JARs. Changes to XUL overlays will still require reloading of the document overlaid.
- browser.dom.window.dump.enabled = true. Enables the use of the dump() statement to print to the standard console. See
window.dump
for more info. You can usensIConsoleService
instead ofdump()
from a privileged script. - javascript.options.strict = true. Enables strict JavaScript warnings in the Error Console. Note that since many people have this setting turned off when developing, you will see lots of warnings for problems with their code in addition to warnings for your own extension. You can filter those with Console2.
- devtools.chrome.enabled = true. This enables to run JavaScript code snippets in the chrome context of the Scratchpad from the Tools menu. Don't forget to switch from content to chrome as context.
- extensions.logging.enabled = true. This will send more detailed information about installation and update problems to the Error Console. (Note that the extension manager automatically restarts the application at startup sometimes, which may mean you won't have time to see the messages logged before the automatic restart happens. To see them, prevent the automatic restart by setting the environment NO_EM_RESTART to 1 before starting the application.)
- nglayout.debug.disable_xul_fastload = true. For Gecko 2.0+ (Firefox 4.0+). See this bug for more information. Although the bug has been closed, it is believed that this pref is still relevant.
- You might also want to set dom.report_all_js_exceptions = true. See Exception logging in JavaScript for details.
- Firefox extension开发之开发环境配置
- Firefox extension 开发之常用XPCOM service
- FireFox Extension 开发 Helloworld
- Firefox extension开发实战
- FireFox扩展开发环境配置手顺:
- Firefox插件开发(extension): Hello World!
- Firefox 扩展开发系列 – Firefox extension 文件的组成
- Firefox 扩展开发系列 – Firefox Extension 调试
- Adobe Extension Builder 3 开发环境搭建
- 嵌入式开发之环境配置
- wireshark开发之环境配置
- jbpm4之开发环境配置
- PHP之配置开发环境
- iOS开发之App Extension(应用扩展)之 -- Today Extension
- Firefox 开发环境的搭建
- 配置pyqt4开发环境, 之 Pycharm配置
- iOS学习之Extension开发详解
- iOS APP Extension开发之TodayExtension
- ActionBar使用方法 - Android活动栏(二)
- msn 最小化到托盘 win7
- 数据绑定之DataFormatString
- 总结一下vim常用编辑命令
- Action Bar使用方法 - Android活动栏(一)
- Firefox extension开发之开发环境配置
- 几十秒之内就能使车内温度由55℃降至25℃
- 僵尸进程
- Android JSON解析类 - JsonReader
- 语句2
- POP3协议
- c++ const
- zoj1091经典的广搜题目
- Android基础之相关布局和参数