You can add it to the Watch tab of the Script tab in Firebug. This will always show the current value of the observed element, even if it goes beyond the scope and is equal to zero. Mix this with break points and you can get what you want, I think.
, console.log . , , :
if (debugging) {
console.log("var test is set at " + test);
}
, , . .