如何在调试SDK附件时不重新运行cfx和Firefox来修改源代码? [英] How to modify source code without re-running cfx and Firefox when debugging an SDK add-on?

查看:144
本文介绍了如何在调试SDK附件时不重新运行cfx和Firefox来修改源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用附加SDK开发一个Firefox附加组件。到目前为止,我必须关闭调试过程并在修改我的源代码后执行cfx run。

所以我想知道如何在不重新运行的情况下编辑源代码Firefox,就像在Chrome中调试JavaScript一样。在使用注入脚本刷新页面之后,是否有任何方法来调试修改过的代码?

我是一个弗拉基米尔·帕兰特的 Extension Auto-Installer'add-on:



在Firefox中安装并配置后,创建一个shell脚本来减少打字开销:

 #!/ bin / bash 

#quick脚本来构建xpi并将其传递到在端口8888
$ b / path / to / addon-sdk / bin / cfx xp上运行的
#扩展auto-installer扩展我和& wget --post-file = add-on-name.xpi http://127.0.0.1:8888/



每次运行脚本时,wget都会将新建的xpi发布到firefox,然后安装它。

I'm developing a Firefox add-on using Add-on SDK. Up to now, I must close debug process and execute "cfx run" after I modified my source code.

So I would like to know how to edit source code without rerunning Firefox, like debugging JavaScript in Chrome. Is there any way to debug modified code after refreshing the page with inject script?

解决方案

I am a huge fan of Wladimir Palant's 'Extension Auto-Installer' add-on:

Once this is installed and configured in Firefox, you can create a shell script to reduce the typing overhead:

#!/bin/bash

# quick script to build the xpi and pass it on to the
# extension auto-installer extension running on port 8888

/path/to/addon-sdk/bin/cfx xpi && wget --post-file=add-on-name.xpi http://127.0.0.1:8888/

Every time you run the script, wget posts the freshly built xpi to firefox, which then installs it.

这篇关于如何在调试SDK附件时不重新运行cfx和Firefox来修改源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆