console info or log is not working in magento

Sep 25, 2012   //   by kdecom   //   magento  //  No Comments
I was woking with magento and debugging some stuff in JS file using
console.log
console.info

none of them seems to be working for me.
I spend almost 3-4 hour of why it wont work.
Then i figure out that varied added a line in their js it removed the console object.
So solution for that problem is
open a file
MAGENTO_PATH/js/varien/js.js file

around line no 636

Replace the line

if (!("console" in window) || !("firebug" in console))

with

if (!("console" in window) || typeof console !== 'object')

And then try it... 
I hope it saves all of your times. 

Cheers
 

Leave a comment

css.php