views:

211

answers:

1

On Win32, with unmanaged code, the return value is usually stored in the EAX register. This is useful when the program doesn't save the return value in a variable. This can easily be seen in the Visual Studio debugger.

Is there an equivalent for managed code?

A: 

It is true that the JIT compiler will still use the EAX register for simple value types, that trick requires enabling mixed native and managed debugging. The truth is, there's no simple way to do this in Visual Studio at the moment. This is something being considered for a future release. Shall I consider this an official request? :-)

Dustin Campbell
Offcourse, if you could process it as a request that would be great. This feature is of great help while debugging API calls or external calls whose source code we can't debug.
Aamir
+1 for return value debugger support, however, has it already been considered and rejected? https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=114921
Andrew M