# HG changeset patch # User Oleksandr Gavenko # Date 1306849940 -10800 # Node ID 80c35b648deb04ea89407c6bd8c674f52cfca6ad # Parent aaf708f6a4983b3486876e9bb372cbb8a7a0c34f Components.utils.reportError. diff -r aaf708f6a498 -r 80c35b648deb firefox-devel.rst --- a/firefox-devel.rst Tue May 31 16:05:26 2011 +0300 +++ b/firefox-devel.rst Tue May 31 16:52:20 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,15 @@ 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. + Components.utils.reportError("msg"); + // Show the error console. + toJavaScriptConsole(); + + https://developer.mozilla.org/en/Components.utils.reportError +