console-shim.js
Protect window.console method calls, e.g. console is not defined on IE8 unless its dev tools are open. IE also doesn't define goodies like console.debug, which can break your entire website if you aren't careful.
Installation
Install with Bower:
bower install --save console-shim.js
Usage
Paste or otherwise load the code at the top of your JavaScript (before using the console).
More complete alternatives
The goal of this library/snippet is to just be small and make IE shut up about errors. It is not a substitute for the various actual console methods themselves. You can find a more complete solution here.
Acknowledgements
Shamelessly inspired by Peter Tseng's answer in this StackOverflow conversation