2

Where does Firefox store the contents (text messages) of the Error Console. The errors, warnings, messages etc. are stored somewhere as Firefox retains them even if the browser is closed and re-opened.

I tried to search the entire profile folder but couldn't find out which file or sqlite DB these error console messages are written to ?

Does anyone have idea about this ?

Thanks in advance.

Nickolay
  • 31,095
  • 13
  • 107
  • 185
akjain
  • 1,787
  • 3
  • 20
  • 35

1 Answers1

4

No, Error Console is cleared if you close Firefox and re-open it.

Error Console isn't tied to a particular browser window, so while Firefox runs, the messages are retained even if you close and open some windows. During the lifetime of the application, the messages are stored in memory (code link).

If you're looking for a way to dump messages that appear in the Error Console to a file, it's possible to do that, but I don't remember off-hand and don't want to look for it unless that's what you're interested in.
[edit The best I could find was this]

[edit] if you indeed see this, are you sure it's just base Firefox? Maybe it's some of the extensions you've installed? (Though it would be weird to implement messages persistence in the Error Console.)

Nickolay
  • 31,095
  • 13
  • 107
  • 185
  • Nickolay, you are right. The console is cleared when Firefox is restarted. To check that no extension retains the console contents, I created a new profile with no add-ons and tested. Yes, my primary purpose, I want to know this is I want to be able to write messages that appear in the Error Console to a file. Please post how this can be done. Is there any extension? – akjain Oct 29 '09 at 09:51
  • Sigh, I looked for 15 minutes and didn't find it. The best I could find is a helper file from Firefox (looks to be self-contained), which can be used to do this: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/content/moz/debug.js#577 – Nickolay Oct 29 '09 at 10:32
  • Nickolay - Either the URL is now pointing to different code, or I cannot understand what needs to be done to dump messages that appear in the Error Console to a file. Can you verify / elaborate for me and others? – user66001 Feb 12 '13 at 07:42
  • @user66001: yes, the code changed in the 3 years since I posted the links. Updated the links to point to the code I originally pointed to. You might want to check how the newer version of that code looks like though. – Nickolay Feb 12 '13 at 21:29
  • Thanks Nickolay. Looks similar to the previous code in the previous link, but still cannot figure out where (presumably) to specify the file path to dump error messages to. Can you clarify? – user66001 Feb 13 '13 at 05:16
  • @user66001: it's not a self-contained code sample, it's a pointer to the real code you can pick apart. The file is specified when initializing nsIFileOutputStream (https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIFileOutputStream). If you have further questions, I recommend you post them separately so that someone else can answer it. Unfortunately I don't have time right now for an elaborate answer. – Nickolay Feb 13 '13 at 18:54
  • Okay. Thanks for what you have supplied thus far Nickolay! – user66001 Feb 14 '13 at 05:27