In Firefox, console.log is not showing anything
Asked Answered
V

11

76

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?

Volumed answered 26/3, 2013 at 9:25 Comment(2)
@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?Fug
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 ?Volumed
V
25

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

Volumed answered 26/3, 2013 at 10:16 Comment(1)
console.log never appears in the "ctrl+shift+j" console. Try "ctrl+shift+k".Skindeep
C
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

Chadwell answered 4/4, 2015 at 4:57 Comment(7)
omg, what was the other console if this one is the right one?Slogan
This is the real answer to the question!Ref
Why did you write K and not J?Bircher
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?Hardfeatured
The corresponding setting in newer versions of Firefox might be "Show Content Messages" in the settings dropdown to the right (next to "Requests").Hardfeatured
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.Leaflet
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.Leaflet
V
25

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

Volumed answered 26/3, 2013 at 10:16 Comment(1)
console.log never appears in the "ctrl+shift+j" console. Try "ctrl+shift+k".Skindeep
L
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.

Lucilla answered 15/6, 2020 at 5:2 Comment(3)
I owe you a beer or whatever drinks you like ! :) Thanks for it !Jovanjove
blue label on rocks pleaseLucilla
Dear FF, Please don't hide the tried and true debugging method. Yes, there are better ways, but at least give us some kind of hint that you're eating console logs.Riband
A
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.

Alagez answered 24/7, 2017 at 12:30 Comment(1)
I don't have Firebug at all and the Firefox console is telling me that "console.log" is undefined.Brunell
H
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.

Huzzah answered 30/12, 2019 at 15:11 Comment(0)
G
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".
Glossator answered 10/4, 2020 at 19:17 Comment(0)
N
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.

Nunci answered 17/4, 2018 at 7:52 Comment(0)
K
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.

Kilroy answered 14/10, 2020 at 6:26 Comment(0)
U
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.

Unspoiled answered 14/7, 2021 at 19:5 Comment(0)
A
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

Abc answered 26/10, 2021 at 14:52 Comment(0)
W
0

Hello To show firefox browser console log when the console is not showing in console log window please follow the below procedures

https://firefox-source-docs.mozilla.org/devtools-user/browser_console/index.html

NB: The Browser Console command line (to execute JavaScript expressions) is disabled by default. To enable it set the devtools.chrome.enabled preference to true in about:config, or set the “Enable browser chrome and add-on debugging toolboxes” (Firefox 40 and later) option in the developer tool settings.


Waive answered 25/1 at 16:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.