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.


4 thoughts on “Code Information Indicators in Visual Studio 2013

  • Gavin says:

    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?

  • Gunnar says:

    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.

  • Lelala says:

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *