I often put something like this at the top of my scripts:

var debug = true;
window.MyConsole = (!debug || !window.console || !console.info) && 
{log:function(){}, debug:function(){}, info:function(){}, 
warn:function(){}, error:function(){}} || console;

Then I use MyConsole in my scripts. When I go live I just put 
Debug=false, and all console code is disabled.

Of course it's better to remove the debug calls, but it's not always 
possible.

NH

Laurakeet wrote:
> If I am using console.log for debugging locally do I need to make sure
> I remove those statements once I have pushed my code to a live web
> page? What if random users don't have firebug? Will it break my forms
> or other pages?
>
> thanks,
> Laura
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to