3

In the Visual Studio watch window you can put $exception and get details of the current exception, but is there an equivalent for the methods return value?

ilivewithian
  • 19,476
  • 19
  • 103
  • 165

3 Answers3

4

In C# - and the answer is simply No. In VB.NET though, you can look for the name of the method in the Locals window, and that should be it. For reference, see this blog post by JaredPar (from Microsoft).

Omer Raviv
  • 11,409
  • 5
  • 43
  • 82
0

You can now.

$ReturnValue in the Watches or Immediate windows. Also, check the Autos window.

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

foson
  • 10,037
  • 2
  • 35
  • 53
0

$eax will usually show the return for most basic types (for C++ anyway - I don't know if this applies to C#).

You may also find $err useful - it shows the current value of GetLastError() ("$err,hr" will try to show a text representation of the error value).

Michael Burr
  • 333,147
  • 50
  • 533
  • 760