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.

Visual Studio 2013: Lens view to references

Tested methods

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.

Visual Studio 2013: Tested methods

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.

Test information

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.

Visual Studio 2013: Test information

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.

Visual Studio 2013: Latest test run results

Peek definition

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.

Visual Studio 2013: Peek definition

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.

Visual Studio 2013: Code Information Indicators settings

Conclusion

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.

Gunnar Peipman

Gunnar Peipman is ASP.NET, Azure and SharePoint fan, Estonian Microsoft user group leader, blogger, conference speaker, teacher, and tech maniac. Since 2008 he is Microsoft MVP specialized on ASP.NET.

    4 thoughts on “Code Information Indicators in Visual Studio 2013

    • July 3, 2013 at 10:35 am
      Permalink

      I’m using the Visual Studio 2013 Preview and have no option under all languages for “Code Information Indicators”. Do you have to be using TFS to get this feature?

    • July 3, 2013 at 2:58 pm
      Permalink

      Not sure if TFS is related somehow. I took Ultimate version of Visual Studio 2013 Preview. Not sure if it is the only version with indicators or are there also other versions that support it.

    • October 17, 2013 at 2:08 pm
      Permalink

      Thanks for that screenshots:
      Looking much better than the 2012er version! At least, some little contrast :-)

    • January 14, 2014 at 6:17 am
      Permalink

      This piece of writing is truly a good one it helps new web
      viewers, who are wishing for blogging.

    Comments are closed.