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?
Asked
Active
Viewed 734 times
3

ilivewithian
- 19,476
- 19
- 103
- 165
3 Answers
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.

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
-
It does, but you have to use Debug + Windows + Registers. No pseudo variable. – Hans Passant Jan 27 '11 at 17:16
-
Sadly that doesn't seem to work for C#. I can see the eax value, but I was hoping for something a bit more high level. – ilivewithian Jan 27 '11 at 17:28
-
@Hans: `$eax` works in the watch window for C++ (but, it looks like the question is more for C# or managed code). – Michael Burr Jan 27 '11 at 20:44