In MATLAB, how do you tell where in the code a variable is getting output?

I have about 10K lines of MATLAB code with about 4 people working on it. Somewhere, someone has dumped a variable in a MATLAB script in the typical way:

foo

Unfortunately, I do not know what variable is getting output. And the output is cluttering out other more important outputs.

Any ideas?

p.s. Anyone ever try overwriting Standard.out? Since MATLAB and Java integration is so tight, would that work? A trick I've used in Java when faced with this problem is to replace Standard.out with my own version.

Edit
Report