Components.utils.reportError.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 31 May 2011 16:52:20 +0300
changeset 874 80c35b648deb
parent 872 aaf708f6a498
child 875 ce06c05f5f4b
Components.utils.reportError.
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
+