-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhow-to-setup-development-env.txt
78 lines (55 loc) · 3.22 KB
/
how-to-setup-development-env.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
updated 2016-09-21
How to setup a FoxyProxy development environment in Firefox on Windows/Unix/Linux:
* Install Firefox Developer Edition.
* On OS/X it gets installed into /Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox
* Profiles are in /Users/fidel/Library/Application Support/Firefox/Profiles. Create new one if necessary.
* Open extensions.ini in the profile directory. Add:
[ExtensionDirs]
Extension0=/Users/fidel/dev/Plugin/src
* Start firefox:
/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox -console -profileManager -purgecaches -no-remote
* Preferences:
xpinstall.signatures.required = false
javascript.options.showInConsole = true
nglayout.debug.disable_xul_cache = true (create)
browser.dom.window.dump.enabled = true
javascript.options.strict = true
devtools.chrome.enabled = true
devtools.debugger.remote-enabled = true
devtools.debugger.prompt-connection = false
extensions.logging.enabled = true
nglayout.debug.disable_xul_fastload = true (create. possibly not needed anymore)
dom.report_all_js_exceptions = true (create)
devtools.errorconsole.deprecation_warnings = true (looks like it's already true in Firefox Developer Edition)
* Test that at least XUL caching is off by editing something in about.xul. Must close and re-open the About
dialog to see if it took effect.
OLD:
For build instructions, see how-to-build.txt
1. Modify the way Firefox is started so it includes these command-line arguments:
-console -profileManager
e.g.: "C:\Program Files\Mozilla Firefox\firefox.exe" -console -profileManager -purgecaches -no-remote
or
/usr/local/bin/firefox -console -profileManager -purgecaches -no-remote
Now whenever you start Firefox, you can see stdout and stderr in the console.
This is important because all dump() statements in FoxyProxy
write to stdout. The -profileManager argument allows you to create/delete
profiles which you'll need for step 2.
2. Start FF and create a new profile.
3. Enable all debugging preferences mentioned here: https://developer.mozilla.org/en-US/Add-ons/Setting_up_extension_development_environment. Alternatively, use https://addons.mozilla.org/en-US/firefox/addon/devprefs/ or https://addons.mozilla.org/en-US/firefox/addon/developer-profile/
4. Close FF.
5. Find the new profile on your hard drive. Go to its extensions\ directory;
e.g., C:\Documents and Settings\EricJung\Application Data\Mozilla\Firefox\
Profiles\g1jro8hx.dev\extensions
and create a file named foxyproxy@eric.h.jung
It should contain a single line that is the path to the src directory you checked
out from FoxyProxy's git repository. e.g.:
<drive>:\dev\foxyproxy\trunk\src
or
~/foxyproxy/trunk/src
6. Start FF. You should be able to access FoxyProxy. Any change you
make to non-overlay code in the src/ directory takes effect immediately.
However, you must close and re-open dialogs for dialog-included JS and XUL
changes to be visible (e.g., options.xul). If you make changes to overlay code,
you must restart FF for the changes to take effect.
7. Use dump() statements to output stuff to stdout; console() statements to
write to the console.