In my Google Chrome extension, I'm using this nifty little trick to distinguish the dev version from the production version: How to tell if a Chrome extension is installed by a real user vs. by me during development?
Is there a similar trick I can use for a Firefox extension? I'd like to use some slightly different settings in my code while developing, but without having to manually change them before releasing.
Something like:
if (addon_in_development) {
setting = 'abc';
}
else {
setting = 'def';
}
You could set an environment variable in the shell, and detect it like this:
See the docs for more info:
https://addons.mozilla.org/en-US/developers/docs/sdk/1.7/packages/api-utils/environment.html
Using the above use case, you would run cfx like this: