Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Firefox, console.log is not showing anything

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?

like image 746
Ashraf Bashir Avatar asked Mar 26 '13 09:03

Ashraf Bashir


People also ask

How do I view the console log in Firefox?

You can open the Browser Console in one of two ways: from the menu: select “Browser Console” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS). from the keyboard: press Ctrl + Shift + J (or Cmd + Shift + J on a Mac).

How do I refresh my Firefox console?

Keep it simple. Better press Ctrl + Shift + L to clear the output in Firefox 44+.


2 Answers

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

like image 63
0fnt Avatar answered Oct 05 '22 06:10

0fnt


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

like image 20
Ashraf Bashir Avatar answered Oct 05 '22 06:10

Ashraf Bashir