MozillaZine

Dev : Tips : Enabling dump

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 23:59, 13 August 2004
Asqueella (Talk | contribs)
(link to Dev_:_Tips_:_Printing_to_JSConsole)
<-- Previous diff
Revision as of 13:17, 4 October 2004
Asqueella (Talk | contribs)
(update)
Next diff -->
Line 1: Line 1:
==Viewing dump() output== ==Viewing dump() output==
-You can use dump() statements instead of alert() to display some debug information for your extension.+You can use ''dump()'' statements instead of ''alert()'' to display debug information for your extension. In order to view the ''dump()'' output, go to [[about:config]], add new boolean pref '''browser.dom.window.dump.enabled''' and set its value to '''true'''.
-In order to view the dump() output, go to about:config, add new boolean pref 'browser.dom.window.dump.enabled' and set its value to 'true'.+
-Then start Firefox up with 'firefox.exe -console' command. You will now be able to see dump() output in the opened console window.+Then start Mozilla (or Firefox or Thunderbird) with '''-console''' parameter ([http://www.mozilla.org/docs/command-line-args.html more information]).
 +You will now be able to see ''dump()'' output in the opened console window.
-See also: [[Dev_:_Tips_:_Printing_to_JSConsole]]+See also: [[Dev : Extensions : Example Code : Printing to JSConsole | Printing debug information to JavaScript Console]].

Revision as of 13:17, 4 October 2004

Viewing dump() output

You can use dump() statements instead of alert() to display debug information for your extension. In order to view the dump() output, go to about:config, add new boolean pref browser.dom.window.dump.enabled and set its value to true.

Then start Mozilla (or Firefox or Thunderbird) with -console parameter (more information). You will now be able to see dump() output in the opened console window.

See also: Printing debug information to JavaScript Console.