Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug return value

I can remember that I could see the return value of a method when I debug a C++ code in Visual Studio 6.0. Now I am missing that feature at C# in Visual Studio 2010.
Where can I see the return value or is there a cause for not showing it?

Edit1: An example:

string GetFullName()
{
  return GetFirstName() + " " + GetLastName();
}

When I step (debugger) from row beginning with return to next line I would like to see the full name in a debug variable window.

like image 220
brgerner Avatar asked Feb 21 '12 10:02

brgerner


1 Answers

This was added in Visual Studio 2013:

The return value(s) get displayed in the “Autos Windows” (Debug->Windows->Autos) and you can also use the pseudo variable “$ReturnValue” in the Watch and/or Immediate window to fetch the last function’s return value.

http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx

like image 125
Alex Edelstein Avatar answered Oct 13 '22 00:10

Alex Edelstein