Microsoft CodeLens Code Health Indicator

Microsoft DevLabs Free

This is an experimental CodeLens Indicator that shows information about the code being edited.

(13) Review
Visual Studio
Download (8,319)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (13)
Q and A (10)
Sign in to write a review
Sort by:

by JRSkerrett | Mon 5:38 PM

Seems pretty usable. It definitely communicates good information. I'm a little dodgy on how the scores are calculated. I've got some simple and highly reused code that only gets a score of 72. I haven't been able to create a method with a score between 80 and 99.

by BrandonJohnson | Wed 6:21 PM

I just installed this extension to evaluate its usefulness. So far it appears that this will be very helpful. VB does work but appears buggy.

by Michel Bretschneider | November 04 2014

Great Tool, saves some time as you don't have to run the analysis all the time manually just to check you didn't sacrificed maintainability for that new fancy feature.
Works even for web projects without a project file, which is neat as those get messy a lot faster than "normal" projects.

by LukePuplett | October 17 2014

The colour of the dot was often not the same as the colour in the pop-up detail, and the metric seemed not to match up either, so I'd see red dots everywhere but were they yellow?

It seemed to marked simple 10 line, arrange, act, assert, unit tests with red dots, so the rest of my code stood no chance.

Uninstalled it.

by David Beaumier | October 10 2014

A must have tool! Although the description says "Only works on C#", it does work with VB.NET (at least as of March 2013).

Here's some improvement suggestions:
- Explain what the numbers between parenthesis mean. For example, when one see "Maintainability Index: 41 (-25)" it should be obvious what (-25) means.
- Somehow explain what is the target value (or range) for each metric. For example, what is an acceptable range for the cyclomatic complexity measure?
- Change measure's color (in the Codelens area, not just in the pop-up) when it's outside of the target range in order to highlight the problem (maybe could use green, yellow, and red).
- Measures could be refreshed more often (or changes could be detected). I sometimes have to close-reopen a file to have the score recomputed.

by codoherty | October 03 2014

I noticed procedures that were not unduly complicated were being flagged making the procedures very distracting. It would be much better if you could configure the index rate level before flagging (color-coded underlines) procedures occurs.

by Nutsea | July 11 2014

Need it for VS 2013 Professional please :)

by Sascha Herne | June 20 2014

Please make this awsome tool available for visual studio 2013 ultimate.

by Ranjith Venkatesh - Work | March 31 2014

Why is it not available for VS 2013 Professional?

by André Obelink - MVP | January 29 2014

I see now that only C# is supported. It does work a little in VB.NET. I hope for full support VB.NET soon.

by Robert Furtner | November 06 2013

very good tool

by TechTurt | October 31 2013

Sweet indicator above your methods telling you their code metrics. Nice to see at a glance.

by drkaj | October 30 2013

Great Tool...

It does what it prommises...

My team could use a lot more from the same drawer!

Sign in to start a discussion

  • Error about .NET framework
    3 Posts | Last post February 19, 2015
    • While installing I got an error this could not be installed because of .net framework not available. 
      1/30/2015 01:00:44 PM - Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'Microsoft CodeLens Code Health Indicator' requires a version of the .NET Framework that is not installed.
      This is because 2015 has been installed. Other VISX suffer from this too. WebEssentials VISX has solved this.
    • Marcel,
      Which version of VS 2015 & VS 2013 do you have installed on your machine?
      If possible, please move to the latest CTP of VS 2015 and try.
    • Update:
      This is an issue in Visual Studio 2015 CTP5. This has been fixed and will be available in the upcoming Visual Studio 2015 CTP6.
  • support for VS 2015
    3 Posts | Last post February 17, 2015
    • Any plans to support 2015? I'm a big fan of this extension. :)
    • If their aren't any plans... can this be posted on github, so the community can contribute?
    • Sam,
      We have now added enhancing these indicators and supporting it for latest version of Visual Studio in the product backlog. [No timelines yet, but it is in the pipeline]
  • Disturbing
    3 Posts | Last post November 07, 2014
    • Good idea, but displaying the maintainability index always makes the text visually more complex. Please provide an option to show only the green, yellow and red icons with a percentage; and another one to set a threshold. For example, show the indicator (a red square) above only those methods, which maintainability index is critical and display nothing above other methods.
    • I would like the UI to place a green, yellow or red filled box next to the maintainability score as this at a glance shows me where I might want to refactor.
      I would also like to remove the colour from the refactor up/down change indication triangle.
    • Thanks for the feedback. At this time, we are not planning any more enhancements to this extension.
  • VS 2013 Ultimate Update 2 RC
    5 Posts | Last post November 07, 2014
    • Please support VS 2013 Ultimate Update 2. Really want to use this!
    • Seems to work if you had it installed before you update to Update 2 or Update 3 RC.
      The installer is looking for a specific version Microsoft.VisualStudio.Ultimate Version : [12.0,12.0.20827.3].
      Can the installer be updated to include support for Update 2 and Update 3 versions?
    • I have updated the extension to enable it to be installed on all versions of Visual Studio 2013.
      Mathew Aniyan
      Program Manager - Visual Studio.
    • I changed the installation target to the following and it still didnt show up in editor settings although extension manager says it's installed and enabled.  Any ideas?
          <InstallationTarget Id="Microsoft.VisualStudio.Premium" Version="[12.0,12.0.30501.00]" />
    • CodeLens is only supported in Visual Studio Ultimate. So you will not be able to see this indicator by installing the binaries in Visual Studio Premium. [Updating the installation target is not a supported operation by the way].
  • Installatoin Filed
    4 Posts | Last post November 07, 2014
    • After I have downloaded and tried to install got the below log
       05 PM - MS VSIX Installer
       05 PM - -------------------------------------------
       06 PM - Initializing Install...
       07 PM - Extension Details...
       07 PM - Identifier      : a8fef2b6-f187-40ef-bf29-3b8bc745c8c9
       07 PM - Name            : MS CodeLens Code Health Indicator
       07 PM - Author          : MS 
       07 PM - Version         : 0.3
       07 PM - Description     : This is an experimental CodeLens Indicator that shows information about the code being edited.
       07 PM - Locale          : en-US
       07 PM - MoreInfoURL     : 
       07 PM - InstalledByMSI  : False
       07 PM - SupportedFrameworkVersionRange : [4.5]
       07 PM - SignedBy        : MS
       07 PM - Certificate Info : [Subject]
        CN=MS, OU=MOPR, OU=OPC, O=MS, L=Redmond, S=Washington, C=US
        CN=MS Code Signing PCA, O=MS, L=Redmond, S=Washington, C=US
      [Serial Number]
      [Not Before]
        4/22/2014 11:09:04 PM
      [Not After]
        7/22/2015 11:09:04 PM
       07 PM - Supported Products : 
       07 PM - MS.VS.Ultimate
       07 PM - Version : [12.0]
       07 PM - References      : 
       07 PM - Identifier   : MS.VS.MPF.12.0
       07 PM - Name         : VS MPF 12.0
       07 PM - Version      : [12.0]
       07 PM - MoreInfoURL  : 
       07 PM - Nested       : No
       07 PM - Searching for applicable products...
       14 PM - Found installed product - MS-VS 2010 Shell - Integrated Mode
       14 PM - Fip - MS-VS Professional 2012
       14 PM - FIP - MS-VS 2012 Shell (Integrated)
       14 PM - FIP - MS-VS Professional 2013
       14 PM - FIP - MS-VS 2013 Shell (Integrated)
       14 PM - FIP - Global Location
       14 PM - FIP - ssms
       15 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
         at VSIXInstaller.App.InitializeInstall()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.Execute()
    • am having the same issue.
    • I have the same issue but for the premium version of VS2013
      On main page says:
      UPDATE: The extension has been updated to allow it to install on all versions of Visual Studio 2013 (including updates). that's not really true!
    • Clarification: CodeLens still requires Visual Studio 2013 Ultimate. The update was to support versions of Visual Studio 2013 Ultimate updates. I will update the description to make this clear.
  • AWESOME! - Only some little feature request
    1 Posts | Last post October 09, 2014
    • Could you add an option to give me an red indicator if my method LOC's go over 20 lines of code? That would be awesome!
  • Upgrade for VS 2013 Update 3
    4 Posts | Last post August 12, 2014
    • Hi.
      I used it in RTM.
      Can you update this extension to support VS 2013 last Update 3 ?
    • If you extract the vsix file (it's just a zip file), you can edit the "extension.vsixmanifest" file to change the supported version.
      On my machine, I had to edit line 13 to read as follows:
      <InstallationTarget Id="Microsoft.VisualStudio.Ultimate" Version="[12.0,12.0.30501.00]" />
    • Also, while it may have been obvious to me, I should also state that you'll need to zip up the directory again and change the extension to vsix first.
      I used 7zip and it didn't work, so I just opened the original vsix file in 7zip and inserted my edited file over top of the existing one.  Double-clicking on the vsix file detected my version of Visual Studio correctly and allowed me to install it.
    • I have updated the extension to enable it to be installed on all versions of Visual Studio 2013.
      Mathew Aniyan
      Program Manager - Visual Studio.
  • Can not install on VS 2013 Ultimate Update 2 RC
    2 Posts | Last post June 05, 2014
  • Support C++ ?
    2 Posts | Last post January 29, 2014
    • Are there any plans to support C++?
    • And VB.NET? It seems to work, but refreshing does only work after opening the file...
  • Docking popup problems
    1 Posts | Last post September 23, 2013
    • Hi, docking the popup created by the this extension will cause the code lens tooltip to hide part of the tooltip content.