Here I continue the series of “What’s new in Microsoft Visual Studio 2013?” and today I will be covering an ultimate tip that a developer working with Visual Studio must know. This will not only help you but will improve your productivity while coding.

 

In this post, we are going to talk about “Peek Definition Window” that comes with Visual Studio 2013. What does it do? Let’s check out it.

 

What’s new in Visual Studio 2013?

If you are new to Visual Studio 2013, you may want to check the below posts first:

 

Peek Definition Window

You must admit that, it is very difficult sometime when you are working on a piece of code and you want to see the implementation of stuffs. In such case, you have to either open that code file in a different window and place it in the second monitor or put it side by side.

 

To improve the productivity of the developers working with Visual Studio, Microsoft came up with the Peek Definition window by which it will bring the complete definition of the code directly in the part where you are working. Let’s see a demonstration of the same, which will give you more idea about the feature.

 

Assume, you have this piece of code where you called a static method Demo.Print() from the main method:

 

Code block

 

Now you decided to know what has been written inside this method. To do this, you will go to definition by right clicking on the method name or pressing F12 in your keyboard. This actually opens up a document where you will be able to view the entire code. Let us now forget what we can do with earlier versions and see the Peek Definition of that code.

 

Select the code for which you want to call the Peek Definition Window

 

To open the peek definition of the selected code, either right click on it and click “Peek Definition” from the context menu or hit the keyboard shortcuts “Alt + F12”.

 

Click Peek Definition of press Alt   F12

 

This will open up a small pinned document just below the line where you called Peek Definition window. This will show you the definition of the code, line numbers and/or any other changes. You can notice that, the rest of the lines will shift downwards to place the definition block in that block. Here is a screenshot of the same:

 

Peek Definition Windows in Visual Studio 2013

 

In case you decide to open the code block in a document view, click on the small icon placed in between the file name and close icon present at the right corner of the block.

 

Isn’t it a good feature? Did you like it? Don’t forget to share your feedback about this post. I am available on Twitter, Facebook and Google+, get in touch with me. Stay tuned for more articles in the coming days. Enjoy using Visual Studio 2013 in your day to day coding environment. Cheers.

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.