Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Visual-Studio

Autos Window in Visual Studio 2013

5.00/5 (4 votes)
31 Oct 2014CPOL2 min read 17.3K  
Autos Window in Visual Studio 2013

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.

Image 1

In the above image, you can see I have method 'ConcatName()', here I am concatenating the two strings '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.

Image 2

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)