My favorite feature in firebug is console.log but it has one problem, you have to remove all calls from source code before going live else your visitors will get many many javascript errors. But there is a really simple solution for that problem, getfirebug.com hosts a javascript which creates a fallback console object if firebug is not installed.
[sourcecode language="javascript"]
[/sourcecode]
So, now we are on the save side and can play around with the console object. The usually most used method is “log”, it simply prints something to the console. Strings, Arrays, Objects, Dom, XML … everything works, log can also print more than one variable at once.
[sourcecode language="javascript"]
console.log(‘A String’, ['an','array'], document.getElementById(‘domObject’));
[/sourcecode]
Console can write messages with a specific type, so you can print errors and warnings to your console.
[sourcecode language="javascript"]
console.error(‘an error’);
console.warn(‘a warning’);
[/sourcecode]
Outline object members in console with the ‘dir’ method.
[sourcecode language="javascript"]
console.dir({nice:’to’, see:’that’, cool:function(){ alert(‘cool’); }});
[/sourcecode]
If you wanna see all cool features, now and live, there is an example page on bohuco.net/code:
http://bohuco.net/code/firebug-logging/
More infos:
http://getfirebug.com/console.html
Google Code – Fun with Firebug
in windows how to do that… i am using xampp and java is installed on C:Program FilesJavajdk1.6.0_18bin