Hide comments in Visual Studio

How often have I wished that there was an option in Visual Studio to hide the comments in the source code. Comments are great, no doubt. And every programmer should well comment his code. However, sometimes they can be a bit annoying and block the sight on the actual code. Mainly if I want to comprehend or refactor a piece of code, it would be nice to have an option to toggle all comments off, especially when it’s my own code. 😉

In short, I wrote a little Add-In for Visual Studio that does just that. Actually it does not really toggle the comments on and off, in fact it sets the text color equal to the background color. It’s probably not the best solution, but it does serve the purpose for now.

It can be downloaded here.

I didn’t make an installer for the Add-In, so you just have to put the unpacked files into your %VSMYDOCUMENTS%\Addins folder where %VSMYDOCUMENTS% usually points to “C:\Users\<UserName>\Documents\Visual Studio 2008”.

You will then see a new button in context menu:

And in the Tools menu to edit the options:

There you can specify what kind of comments should be affected.


7 Responses to “Hide comments in Visual Studio”

  1. Arda Says:

    Thank you for the effort. It just works.

  2. E P Says:

    Does it work with VS2005?

  3. E P Says:

    Yes! It does work, after some small changes:

    Line 5: 8.0
    Line 9: 8.0
    Line 16: HideComments.dll

    Thanks, I’m glad I found this add-in!

  4. ozkan Says:


    Does this work with Visual Studio 2010?

  5. Ted Says:

    Unless I missed something – it hides them fine, but I had to manually set the color back. the toggle didn’t work. VS2008.

  6. asi Says:

    it can really useful for me to use this add-on
    but i cant see it in my VS 2012
    i did all the procedures with the copy etc, but i still cant see it.


  7. Newton Says:


    Is there any way you can provide the source code to this? I’d like to tweak for my personal purposes (not for resale obviously).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: