Skip to content

Instantly share code, notes, and snippets.

@shanejdonnelly
Created June 11, 2012 16:19
Show Gist options
  • Save shanejdonnelly/2910973 to your computer and use it in GitHub Desktop.
Save shanejdonnelly/2910973 to your computer and use it in GitHub Desktop.
Add a debug console to IE
//set the console log area up - only populated if IE
$('body').append('<div id="debug" style="position: absolute; top: 0; left: 200px; background: #fff; display: none; visibility: hidden;"></div>')
//log messages to this function instead of using console.log
function ie_console_log(console_message) {
try {
console.log(console_message)
}
catch (e) {
$('#debug').append('<div class="debug">'+ console_message +'</div>')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment