Viewing the return value of a method in the watch window

2 parts really;

// C# code
bool IsTrue()
{
  return true;
} // HERE
  1. Is the return value from the above method stored in the AX register when the instruction pointer is HERE
  2. Simply for convenience how can I get that register in the watch window (in addition to the register window), I tried AX, $AX, &AX, {AX} and used EAX or RAX with these tokens to no avail

EDIT: An objective is that I don't have to alter the code to see the results so adding a temp variable is out, the method above is a vast simplification and in the real code, as is common, these kinds of calls are nested, or in lambda expressions or multi element logical expressions

Answers


If I want to know the return value of a function, I assign the value to a variable and return that variable instead. Old habits of Console.WriteLine()-debugging.. but it works.


Apparently this feature will be available in VS2013 http://blogs.msdn.com/b/visualstudioalm/archive/2013/06/27/seeing-function-return-values-in-the-debugger-in-visual-studio-2013.aspx


Need Your Help

How do I load the Firebug extension into FirefoxProfile for WebDriver in C#

c# visual-studio-2010 firebug webdriver

I need to load Firebug and NetExport into a firefox profile for WebDriver, and the following code doesn't work at all:

How to Encrypt the Data in CoreData (ios)?

ios core-data nsfilemanager

So i have been playing around with CoreData , trying to encrypt the SQL lit using some online tutorial by Nick Harris Click Here

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.