Skip to content Skip to sidebar Skip to footer

Console.log() Is Defined But Doesn't Log In Ie - Empty Console

Javascript on a page in Internet Explorer (8 and 9) with Developer Tools open reaches console.log(), which is defined - but nothing appears in the actual log. Things tried: Double

Solution 1:

The culprit in this case turned out to be, of all things, firebug lite.

My test dev pages often include this to (ironically) aid certain types of debugging in IE:

<!--[if IE]>
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script>
<![endif]-->

Since it appears in text editors as a comment, it's easy to accidentally overlook.

Alerting alert(console.log); before and after shows firebug lite changes the console.log function from the native code to this:

function(){return f.apply(c,arguments)}

...which for some reason (at the moment, here) then does nothing.

Without Firebug Lite getting involved, alert(console.log); in IE gives this:

function log() {
[native code]
}

...and does its usual trick of logging if f12 Dev Tools is open and crashing if it isn't.

Post a Comment for "Console.log() Is Defined But Doesn't Log In Ie - Empty Console"