Introduction
Today, I want to share with you a Visual Studio 2013 feature that is sometimes very useful, VS 2013 introduced a good feature called 'Autos window' that helps us to observe the method or collection of methods return values in the running debugging session.
'Autos window' is helpful when the return values by methods are not stored in any local variable and we need to check that local value. So now, you might be thinking that we already have this feature, you can view the local value by giving the particular value in watch window but you know that’s the manual work.
So with the help of this new feature of VS2013, we can avoid the manual work by developer and we can have help of 'Autos Windows' to see the methods return values.
When you run the Visual Studio debugger and start debugging, then Autos variables will be automatically detected by VS debugger. VS finds which variables are necessary for the running code block and based on that VS lists the 'Autos' variables.
In the above image, you can see I have method 'ConcatName()
', here I am concatenating the two string
s 'UserFName
' and 'UserLName
' and then creating a full name in another string
called as 'Name
'. So when I run the application and debug this, you can see in the 'Autos window' we are getting the value for every local variable and methods return values.
Now suppose we have nested function and we want to check values for every function. So how we will get those values? Let me show you by another example. Again I am displaying and concatenating the Name and Address details for user so when I run this application and start debugging and open the Autos window (“Debug>Window>Autos”), you will get all the details of both of the calling methods and their corresponding return values in Autos window.
You can see in the image here, in Autos window we are getting the details individually for every calling method and corresponding return values like 'GetUserName()
', GetUserAddress()
, String.Format
and UserDetails
'.
So I hope, you guys got some idea about Autos window features after reading this.
Thanks for reading.