Dave's Brain

Browse - Programming Tips - How can I make Firefox output to a console?

Date: 2007sep12
Keywords: debug, log
Warning: You don't usually do this anymore

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'); }

Add a comment

Sign in to add a comment
Copyright © 2008-2017, 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.