For some reason, the prototype framework (or another JavaScript code) that is shipped with Magento is replacing standard console functions, so I can\'t debug anything. Writi
For example,
delete console.log
would also restore console.log
:
console.log = null;
console.log; // null
delete console.log;
console.log; // function log() { [native code] }
Save a reference to the original console
in a variable at the very start of the script and then either use this reference, or redefine console
to point to the captured value.
Example:
var c = window.console;
window.console = {
log :function(str) {
alert(str);
}
}
// alerts hello
console.log("hello");
// logs to the console
c.log("hello");