author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 20 Nov 2011 20:14:48 +0200 | |
changeset 1092 | 639665016a27 |
parent 968 | bd872153f00d |
permissions | -rw-r--r-- |
668
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
-*- mode: outline; coding: utf-8; fill-column: 90 -*- |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
* Setting up environment. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
In 'about:config' set this variable: |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
javascript.options.showInConsole = true |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
Logs errors in chrome files to the Error Console. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
javascript.options.strict = true |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
Enables strict JavaScript warnings in the Error Console. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
extensions.logging.enabled = true |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
This will send more detailed information about installation and update |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
problems to the Error Console. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
https://developer.mozilla.org/en/Setting_up_extension_development_environment |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
setting up profile, options and about developer plugin |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
* Useful developer plugin. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
19 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
20 |
** Firebug. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
Firebug integrates with Firefox to put a wealth of development tools at your fingertips |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
23 |
while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
web page. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
http://getfirebug.com |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
home page |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
28 |
https://addons.mozilla.org/firefox/addon/1843 |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
29 |
download page |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
30 |
|
684 | 31 |
** Live HTTP Headers. |
32 |
||
33 |
* First by adding a 'Headers' tab in 'View Page Info' of a web page. |
|
34 |
* Second by adding a tool in the 'Tools->Web Development' menu to be able to display http |
|
35 |
headers in real time (while pages are being downloaded from the Internet. |
|
36 |
* Third by letting you edit request headers and replay an URL (beta). Look for the Replay |
|
37 |
button in the live window! |
|
38 |
||
39 |
This project may be of some help for the following: |
|
40 |
||
696 | 41 |
* Help debugging web application. |
42 |
* See which kind of web server the remote site is using. |
|
43 |
* See the cookies sent by remote site. |
|
44 |
||
45 |
Alternatively you can use fiddler2 (only Windows as it written in .NET) |
|
684 | 46 |
|
47 |
http://livehttpheaders.mozdev.org/ |
|
48 |
home page |
|
49 |
https://addons.mozilla.org/en-US/firefox/addon/3829/ |
|
50 |
download page |
|
696 | 51 |
http://www.fiddler2.com/fiddler2/ |
52 |
Web Debugging Proxy |
|
53 |
||
54 |
** Tamper Data. |
|
55 |
||
56 |
* Use tamperdata to view and modify HTTP/HTTPS headers and post parameters. |
|
57 |
* Trace and time http response/requests. |
|
58 |
* Security test web applications by modifying POST parameters. |
|
59 |
||
60 |
Based on code and incompotable with "Live HTTP Headers" extensions. |
|
61 |
||
62 |
http://tamperdata.mozdev.org/index.html |
|
63 |
home page |
|
64 |
https://addons.mozilla.org/en-US/firefox/addon/966/ |
|
65 |
download page |
|
66 |
http://jimbojw.com/wiki/index.php?title=Tamper_Data |
|
684 | 67 |
|
683 | 68 |
* How build Firefox. |
69 |
||
70 |
https://developer.mozilla.org/en/Build_Documentation |
|
71 |
Build Instructions |
|
72 |
https://developer.mozilla.org/en/Mozilla_Source_Code_%28Mercurial%29 |
|
73 |
Getting Mozilla Source Code Using Mercurial |
|
74 |
||
668
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
75 |
* Extension security. |
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
76 |
|
d7142397bfb3
Move developer info to firefox-devel.txt
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
77 |
https://developer.mozilla.org/en/Security_best_practices_in_extensions |
872
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
78 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
79 |
* Debugin Firefox. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
80 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
81 |
https://developer.mozilla.org/en/how_to_get_a_stacktrace_with_windbg |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
82 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
83 |
* Debugin JavaScript in Firefox. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
84 |
|
874
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
85 |
// Logs errors in chrome files to the Error Console. Enable Components.utils.reportError(). |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
86 |
user_pref("javascript.options.showInConsole", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
87 |
// Disables the XUL cache so that changes to windows and dialogs do not require a restart. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
88 |
user_pref("nglayout.debug.disable_xul_cache", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
89 |
// Enables the use of the dump() statement to print to the standard console. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
90 |
user_pref("browser.dom.window.dump.enabled", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
91 |
// Enables strict JavaScript warnings in the Error Console. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
92 |
user_pref("javascript.options.strict", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
93 |
// This enables to run JavaScript code snippets in the chrome context of the Scratchpad from the Tools menu. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
94 |
user_pref("devtools.chrome.enabled", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
95 |
// This will send more detailed information about installation and update problems to the Error Console. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
96 |
user_pref("extensions.logging.enabled", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
97 |
user_pref("dom.report_all_js_exceptions", true); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
98 |
|
872
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
99 |
** Debugging JavaScript in Firefox with Web Console. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
100 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
101 |
'console.log()', 'console.info()', 'console.warn()', 'console.error()'. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
102 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
103 |
https://developer.mozilla.org/en/Using_the_Web_Console |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
104 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
105 |
** Debugging JavaScript in Firefox with Firebug. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
106 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
107 |
With Firebug you can use 'console.log(obj)' for logging. Also output can be grouped with |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
108 |
console.group("name") to start a new indentation block, and then console.groupEnd(). |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
109 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
110 |
Same but with different coloring do 'console.debug', 'console.info', 'console.warn', and |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
111 |
'console.error' functions. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
112 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
113 |
'console.log' can format strings in the great tradition of printf. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
114 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
115 |
'console.trace()' - to print trace. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
116 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
117 |
http://getfirebug.com/logging |
968 | 118 |
logging |
119 |
http://getfirebug.com/wiki/index.php/Console_API |
|
120 |
Console API |
|
872
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
121 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
122 |
** dump(). |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
123 |
|
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
124 |
Set in 'about:config' 'browser.dom.window.dump.enabled' to 'true'. |
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
125 |
|
874
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
126 |
All messages go to native console. On Windows this require '-console' option for 'firefox.exe'. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
127 |
|
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
128 |
https://developer.mozilla.org/en/DOM/window.dump |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
129 |
|
876 | 130 |
** Components.utils.reportError. |
872
aaf708f6a498
Debugging JavaScript in Firefox with Web Console.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
696
diff
changeset
|
131 |
|
875
ce06c05f5f4b
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
874
diff
changeset
|
132 |
Write error msg to Error console (not in Web Console). |
ce06c05f5f4b
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
874
diff
changeset
|
133 |
|
874
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
134 |
Components.utils.reportError("msg"); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
135 |
// Show the error console. |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
136 |
toJavaScriptConsole(); |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
137 |
|
876 | 138 |
Firefox 3.x require set preference 'javascript.options.showInConsole' to 'true' which is |
139 |
default value fro Firefox 4.x. |
|
140 |
||
874
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
141 |
https://developer.mozilla.org/en/Components.utils.reportError |
80c35b648deb
Components.utils.reportError.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
872
diff
changeset
|
142 |
|
879
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
143 |
* Native Firefox debugging. |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
144 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
145 |
** Adding symbols from Symbol Server. |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
146 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
147 |
Execute in WinDbg: |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
148 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
149 |
.sympath SRV*c:\symcache\*http://msdl.microsoft.com/download/symbols;SRV*c:\symcache\*http://symbols.mozilla.org/firefox |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
150 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
151 |
or Ctrl+S and add: |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
152 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
153 |
SRV*c:\symcache\*http://msdl.microsoft.com/download/symbols;SRV*c:\symcache\*http://symbols.mozilla.org/firefox |
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
154 |
|
77619a223f34
Adding symbols from Symbol Server.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
876
diff
changeset
|
155 |
https://developer.mozilla.org/en/Using_the_Mozilla_symbol_server |