75

I'm trying a simple console.log function in Firefox:

console.log("Hello, World!");

You may try it on: http://jsfiddle.net/EkZjK/

You may also try the full code in a stand-alone HTML file:

<html>
    <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <script type="text/javascript">
            console.log("Hello World !");
        </script>
    </head>
</html>

I get console logs in Chrome. But in Firefox I cannot see the logs.

I tried the Firebug console and Ctrl + Shift + J. Both don't show the log message in Firefox.

PS: I restarted Firefox, restarted Windows, tried on another machine, deleted the Firefox profile and created another one, and reinstalled Firefox. But the problem still exists.

How can I solve this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ashraf Bashir
  • 9,686
  • 15
  • 57
  • 82
  • @Asraf Bashir: Restart Firefox then try Restarting Windows itself. So you are still not sure whether you got a log in chrome ? Did you open the console first and then load the page or how did you do it exactly? – karthick Mar 26 '13 at 09:28
  • Yes, I open the console first then load the page. I tried windows restarting, ff restarting. I even tried on another machine. Could you please try it yourself by running the jsfiddle above in you FF ? – Ashraf Bashir Mar 26 '13 at 09:46

10 Answers10

121

For some previous versions of Firefox

I had the same problem with a different root cause.

Hit Ctrl + Shift + K to open the full console. In the second row from the top there are tabs - Net, CSS, JS, Security, Logging, and Server. Hit the triangle to the right of "Logging" to open the dropdown and make sure that at least "log" is on.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0fnt
  • 8,211
  • 9
  • 45
  • 62
  • omg, what was the other console if this one is the right one? – eyn Oct 10 '17 at 23:44
  • This is the real answer to the question! – Merin Nakarmi Jan 15 '18 at 00:19
  • Why did you write K and not J? – Nubcake Mar 27 '18 at 21:45
  • 1
    Current versions of Firefox (e.g. 81.0.2) have *"Errors"*, *"Warnings"*, *"Logs"*, *"Info"*, *"Debug"*, *"CSS"*, *"XHR"*, and *"Requests"*. Where is the drop down? The settings dropdown has *"Show Content Messages"*, *"Show Timestamps"*, *"Group Similar Messages"*, *"Enable Autocompletion"*, and *"Instant Evaluation"*. Can you update your answer? – Peter Mortensen Oct 20 '20 at 15:50
  • 1
    The corresponding setting in newer versions of Firefox might be *"Show Content Messages"* in the settings dropdown to the right (next to *"Requests"*). – Peter Mortensen Oct 20 '20 at 16:39
  • I'm using Chromium and Firefox 81.0.2 with the same effect. console.log() output appears in Chromium, but not in Firefox and there is no "Show Content Messages" option in the console drop-down, and I have all the options enabled "Errors", "Warnings" etc. I'm on Ubuntu 20.10. – happybeing Oct 29 '20 at 12:21
  • Strange: I went back to test FF in a new window and now it works. I wonder if it was broken by an error in my script, but stays broken after I fixed it. – happybeing Oct 29 '20 at 12:26
25

Reinstalling the Firebug plugin solved the issue. Now it appears in the Firebug console (not in Ctrl + Shift + J).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ashraf Bashir
  • 9,686
  • 15
  • 57
  • 82
11

For Firefox 77.0.1 and Ubuntu 18.04 (Bionic Beaver) LTS (Bionic Beaver):

I had the same problem.

Open the Firefox console - Ctrl + Shift + J.

In the browser console, click on the top right settings icon. In the dropdown, click on Show Content Messages.

Then console.log messages will start showing up in the console.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Aseem
  • 5,848
  • 7
  • 45
  • 69
3
  1. Uninstall Firebug (or disable it)
  2. Press F12 and enjoy the console.

The problem is Firebug. It's not maintained anymore and may be unstable (see the official page). Other users here recommend to update it, but it may not work, or work until the next Firefox update.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
fresko
  • 1,890
  • 2
  • 24
  • 25
  • 2
    I don't have Firebug *at all* and the Firefox console is telling me that "console.log" is undefined. – dauber Jul 25 '17 at 15:16
3

I had this problem in Firefox 71, and I found that when you open the console not everything is automatically logged.

When you go to the right side of the console you see a number of buttons, (Errors, Warnings, Logs, Info, Debug, CSS, XHR, and Requests). Enable all logs by clicking these buttons.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Freeze
  • 237
  • 1
  • 5
  • 12
3

I had the same problem with Firefox 75.0 on Ubuntu 18.0 (Bionic Beaver). The following solved it for me:

  1. Open the Console
  2. Click the Logs button until grey in Filter output row on the right
  3. Click the Settings gear on the right and choose in the dropdown "Persist Logs".
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Hmerman6006
  • 1,622
  • 1
  • 20
  • 45
2

I had the problem again today with Chrome and Firefox. Ultimately, however, the cause was not the console, but some code in jQuery UI v1.12.1.

After I had written console.clear() after the jQuery UI code, the console outputs after this script were shown again.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
2

I recently had the same issue with Firefox. What worked for me was restarting Firefox and then adding the Console.clear() method to my script. Once the page loads up, the console logs your messages again.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Viceodev
  • 31
  • 5
0

In FireFox 90.0, Mac OS 11.4, I had to click on the Gear Icon and put a check mark next to 'Show Content Messages' before console.log output appeared on the console.

Edit: I see now this was mentioned in the fine print on one of the responses above.

TundraGreen
  • 51
  • 1
  • 3
0

I had the same problem with my browser but all you’ll have to do is to open up the console by pressing ctrl + shift + k or press the right key and press inspect then navigate to the left hand section that says logs click on it and you should be good to go

MD. RAKIB HASAN
  • 3,670
  • 4
  • 22
  • 35
Travon
  • 1
  • 2