Dave's Brain

Browse - programming tips - firefox dump to console

Date: 2007sep12
Keywords: debug, log

Q. How can I make Firefox output to a console?

A.

Start Firefox with:
	
	<path-to-firefox> -console

Enter about:config in the address area.
Right-click to make a new option.
Like this:

	browser.dom.window.dump.enabled = true

Restart Firefox

Now your javaScript can do:

	dump("Hello World\n");


So I don't have to add the newline I use a function like this:

	function debug(a) {
		dump(a + '\n');
	}
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: