DEV Community

Cover image for Codelens in Visual Studio Community Edition
Christopher C. Johnson
Christopher C. Johnson

Posted on • Originally published at thatamazingprogrammer.com on

5 1

Codelens in Visual Studio Community Edition

One of my favorite things in Visual Studio has always been CodeLens. It's this beautiful little feature that tells you what's referencing a piece of code and where it is as well as if it has any associated tests.

From what I remember it was only available for the paid tiers of Visual Studio for the longest time. A lot of developers complained that CodeLens was missing from Express, which was an even more limited edition of Visual Studio before Community became a thing.

I hadn't thought about CodeLens outside of a work environment because I just never needed it on the smaller side-projects I made at home. As I've been making larger and larger projects for myself and the community I started to miss having the ability to quickly find where some of my functions or models were being referenced or if they had test coverage.

I mentioned that to someone tonight and they told me that we've had CodeLens in the Community since 2017.

2017!

After looking around the settings, sure enough, I found that it came with CodeLens installed but turned off by default.

All you have to do to activate it is:

  • Click Tools > Options
  • Toggle open Text Editor
  • Toggle open All Languages
  • Click CodeLens
  • Click Enable CodeLens
  • Then click OK

Ta-da! 🎉

Now you have CodeLens and can start getting better insights into your project like this:

Number of references a model named Settings Model has

Number of tests a method named Set Settings has

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more