27 06 2013
Code Information Indicators in Visual Studio 2013
Visual Studio 2013 introduces new code editor enhancement called Code Information Indicators (CII). CII is set of code editor extensions that make it easier to get information about code structure and changes. Also tests and test results can be easily accessible from code editor. In this posting I will introduce you most important new code indicators.
Lens view to references
Now you can quickly find out references to code objects by just clicking link above definition like shown on following screenshot. You can scroll through list of references and small popup block shows you how code object is used in specific place.
If you write tests you can see also information about how your code is tested. Take a look at the following screenshot. Redboxes show you how test results are shown above method definitions.
You can see also one method that is not covered with tests – SendQuestion(). As there are now tests available for this method then there’s no test information shown.
If we need more information about tests that called given method we can click on test result label and popup opens with all tests that cover our method.When double-clicking on test the test is opened in code editor.
Last test run results
Now you can see latest test run results in code editor. Here are tests with last results. We can see that Contract() passed and Maps() had problems.
Previously we had “Go to definition” menu option to go and see definitions of code objects. Now we have also “Peek definition” option that opens subwindow where definition of code object is shown.
Turning code information indicators on and off
You can easily turn CII on and off and modify its options from Visual Studio options dialog like shown below.
There are some more visual aids available that help you to visualize and access code related information far better than before. New IDE improvements are your great help when working with legacy or complex and unfimilar code. Test related indicators let you easily find tests that cover your code objects and it’s easy to find out what method calls failed during tests. As all those indicators are very new I need some more time to play with them to give more advanced opinion about their usage. But first picture looks great and I suggest you to try out how indicators help you when coding.