But it works for me!!!
The lines of javascript below, included at the top of your scripts, could save you a lifetime of confusing conversations with clients where they say an application doesn’t work and you can clearly see that it works on your laptop.
The difference is that you have firebug installed and they don’t, so for you console is defined, but for them it is not, so if you leave any references to it in the app it will throw an error for them. But this fixes that;
if(!console) {
var console = {};
console.log = function() {
return null;
};
}
Related posts:
- ImmunodeficiencyI just solvedĀ a bug which stemmed from the fact...
- A useful debugging methodI’m always dismayed by the lack of debugging information out...
- This literally changesYou should know that I’ve built up a lot of...
- To splice or not to deleteI haven’t blogged much about programming recently due to being...
Tags: bug, console.log, firebug, javascript
That’s really handy. I’ve recently got into the delights of Firebug.
… AND egg!
Hello!
Glad to be of help. It took me ages to get to know firebug. My other top tip: scratch it behind teh thorax and it generally performs better.
And egg