views:

144

answers:

4

Is there a console logger for IE? I'm trying to log a bunch of tests/assertions to the console but I can't do this in IE.

+2  A: 

There is Firebug Lite which gives a lot of Firebug functionality in IE.

Daniel DiPaolo
A: 

You can open up another window, and just write to that.

Svend
+2  A: 

Try log4javascript, which has a logging console that works in all mainstream browsers. Full disclosure: I wrote it.

Tim Down
Wow, I like the looks of this! Nice work. I'm going to be checking this out...
ken
+1  A: 

You can access IE8 script console by launching the "Developer Tools" (F12). Click the "Script" tab, then click "Console" on the right.

From within your JavaScript code, you can do any of the following:

<script type="text/javascript">
    console.log('some msg');
    console.info('information');
    console.warn('some warning');
    console.error('some error');
    console.assert(false, 'YOU FAIL');
</script>

Also, you can clear the Console by calling console.clear().

NOTE: It appears you must launch the Developer Tools first then refresh your page for this to work.

Craig
This is only for IE8+, but it's a damn fine console. It's basically a replica of Firebug, missing a few features with some other ones thrown in. Search MSDN for it.
ken
Ah, even though it falls short of Firebug, it still has just enough of what I need. Thanks!
bobthabuilda