Instead of using alert() to debug in Firefox, the dump() method can be used.
Just add the following line to prefs.js:
user_pref("browser.dom.window.dump.enabled", true);
and open a terminal and type:
shell> firefox -console
and try the following command in the address bar:
javascript:dump("hello, world\n");
You can see the text “hello, world” printed in the terminal.
This is much better than alert() since the output can be copied/pasted if necessary.
technorati tags: mozilla, firefox, debug
RSS Feed
December 26th, 2006 at 4:36 pm
Yeah, that was tricky.
Fan of Don Lapre
larisa@larisajoyreilly.com