Viewing dump() output: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{extdev}}
See [http://developer.mozilla.org/en/docs/DOM:window.dump dump() documentation] at developer.mozilla.org.


==Viewing dump() output==
[[Category:Redirects]]
 
You can use <tt>dump()</tt> statements instead of <tt>alert()</tt> to display debug information for your extension. In order to see the <tt>dump()</tt> output, go to [[about:config]] (or edit [[user.js]] file), add new boolean pref '''browser.dom.window.dump.enabled''' and set its value to '''true'''.
 
Then start Mozilla (Suite, Firefox or Thunderbird) with '''-console''' parameter ([http://www.mozilla.org/docs/command-line-args.html more information]):
mozilla -console
 
'''Note:''' you must have all mozilla instances closed before running the command, if not the console will not appear.
 
You should now see <tt>dump()</tt> output in the opened console window.
 
==See also==
*[[JavaScript Console#Logging custom messages in JavaScript Console|How to log debug information to JavaScript Console.]]
 
[[Category:Development]]

Latest revision as of 12:39, 7 May 2006

See dump() documentation at developer.mozilla.org.