80 |
80 |
81 https://developer.mozilla.org/en/how_to_get_a_stacktrace_with_windbg |
81 https://developer.mozilla.org/en/how_to_get_a_stacktrace_with_windbg |
82 |
82 |
83 * Debugin JavaScript in Firefox. |
83 * Debugin JavaScript in Firefox. |
84 |
84 |
|
85 // Logs errors in chrome files to the Error Console. Enable Components.utils.reportError(). |
|
86 user_pref("javascript.options.showInConsole", true); |
|
87 // Disables the XUL cache so that changes to windows and dialogs do not require a restart. |
|
88 user_pref("nglayout.debug.disable_xul_cache", true); |
|
89 // Enables the use of the dump() statement to print to the standard console. |
|
90 user_pref("browser.dom.window.dump.enabled", true); |
|
91 // Enables strict JavaScript warnings in the Error Console. |
|
92 user_pref("javascript.options.strict", true); |
|
93 // This enables to run JavaScript code snippets in the chrome context of the Scratchpad from the Tools menu. |
|
94 user_pref("devtools.chrome.enabled", true); |
|
95 // This will send more detailed information about installation and update problems to the Error Console. |
|
96 user_pref("extensions.logging.enabled", true); |
|
97 user_pref("dom.report_all_js_exceptions", true); |
|
98 |
85 ** Debugging JavaScript in Firefox with Web Console. |
99 ** Debugging JavaScript in Firefox with Web Console. |
86 |
100 |
87 'console.log()', 'console.info()', 'console.warn()', 'console.error()'. |
101 'console.log()', 'console.info()', 'console.warn()', 'console.error()'. |
88 |
102 |
89 https://developer.mozilla.org/en/Using_the_Web_Console |
103 https://developer.mozilla.org/en/Using_the_Web_Console |
104 |
118 |
105 ** dump(). |
119 ** dump(). |
106 |
120 |
107 Set in 'about:config' 'browser.dom.window.dump.enabled' to 'true'. |
121 Set in 'about:config' 'browser.dom.window.dump.enabled' to 'true'. |
108 |
122 |
109 All messages go to Web console. |
123 All messages go to native console. On Windows this require '-console' option for 'firefox.exe'. |
110 |
124 |
|
125 https://developer.mozilla.org/en/DOM/window.dump |
|
126 |
|
127 * Components.utils.reportError. |
|
128 |
|
129 Components.utils.reportError("msg"); |
|
130 // Show the error console. |
|
131 toJavaScriptConsole(); |
|
132 |
|
133 https://developer.mozilla.org/en/Components.utils.reportError |
|
134 |