diff -r bee80646511d -r 33d82b769632 firefox-devel.rst --- a/firefox-devel.rst Wed Jun 01 19:35:06 2011 +0300 +++ b/firefox-devel.rst Tue Jun 07 14:40:58 2011 +0300 @@ -82,6 +82,20 @@ * Debugin JavaScript in Firefox. +// Logs errors in chrome files to the Error Console. Enable Components.utils.reportError(). +user_pref("javascript.options.showInConsole", true); +// Disables the XUL cache so that changes to windows and dialogs do not require a restart. +user_pref("nglayout.debug.disable_xul_cache", true); +// Enables the use of the dump() statement to print to the standard console. +user_pref("browser.dom.window.dump.enabled", true); +// Enables strict JavaScript warnings in the Error Console. +user_pref("javascript.options.strict", true); +// This enables to run JavaScript code snippets in the chrome context of the Scratchpad from the Tools menu. +user_pref("devtools.chrome.enabled", true); +// This will send more detailed information about installation and update problems to the Error Console. +user_pref("extensions.logging.enabled", true); +user_pref("dom.report_all_js_exceptions", true); + ** Debugging JavaScript in Firefox with Web Console. 'console.log()', 'console.info()', 'console.warn()', 'console.error()'. @@ -106,5 +120,20 @@ Set in 'about:config' 'browser.dom.window.dump.enabled' to 'true'. -All messages go to Web console. +All messages go to native console. On Windows this require '-console' option for 'firefox.exe'. + + https://developer.mozilla.org/en/DOM/window.dump + +** Components.utils.reportError. + +Write error msg to Error console (not in Web Console). + Components.utils.reportError("msg"); + // Show the error console. + toJavaScriptConsole(); + +Firefox 3.x require set preference 'javascript.options.showInConsole' to 'true' which is +default value fro Firefox 4.x. + + https://developer.mozilla.org/en/Components.utils.reportError +