Firebug javascript variables

oggiemc used Ask the Experts™
Hello all,

Is there anyway to check a variables value in firebug without using breakpoints on a particular line? i.e i want to check variables in multiple blocks of code at a particular moment, without having to stop the code execution at these different execution times?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I usually just output the variables I want to see to console.log.
I do this so often that I create a shortcut at the beginning of my scripts:
var cs = (window.console) ? console.log : function() {};

Then when I want to see what the current values of variables x, y and z are, I just put them in an array:
cs([x, y, z]);

Obviously, this has to be done in the code itself, not from within firebug.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial