Getting a Method's Return Value in the VS Debugger
Posted
by Bullines
on Stack Overflow
See other posts from Stack Overflow
or by Bullines
Published on 2009-11-09T22:11:10Z
Indexed on
2010/04/12
5:13 UTC
Read the original article
Hit count: 371
Is it possible to get a method's return value in the Visual Studio debugger, even if that value isn't assigned to a local variable? For example, I'm debugging the following code:
public string Foo(int valueIn)
{
if (valueIn > 100)
return Proxy.Bar(valueIn);
else
return "Not enough";
}
Since I'm not setting any local variables in Foo, and assuming I'm not setting a break point in whatever's calling Foo, is there a way to see what the return value is if I have a breakpoint inside of Foo (or another way)? I don't have much experience with the Autos or Intermediate windows, so I'm not sure if those are even a valid option or not.
© Stack Overflow or respective owner