Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
744 views
in Technique[技术] by (71.8m points)

logging - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...