How to see variable in calling function in visual studio?
Posted
by carter-boater
on Stack Overflow
See other posts from Stack Overflow
or by carter-boater
Published on 2010-03-31T16:42:27Z
Indexed on
2010/04/12
20:23 UTC
Read the original article
Hit count: 218
Hi all,
Does anyone know how to watch a variable in calling function. For example: C#:
void fn a()
{
int myVar=9;
b();
}
b()
{
Throw new Exception();
}
How can I watch myVar when I get the exception in function b?? I have a really big recursive function with in a loop and get an exception in one iteration. I don't know which iteration it belongs to$%^&*(. The thing I did was to promote my intersted variable to global so I can watch them anywhere. However, I don't think that's a good idea only for debug.
Thanks everyone!
© Stack Overflow or respective owner