Click here to Skip to main content
15,029,958 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Is there a way to hide the xml comments at the head of each method in visual studio? These comments are important, but I don't need to see them when I'm tracking down bugs or stepping through code.

Edit: Not looking for them to be collapsed either, I'm looking for a solution that makes them hidden (not even visible).
Updated 12-Feb-10 6:03am

Write an add-in for VS2010 that will do that for you. The standard versions won't hide those for you, collapsing is the best you can do without an add-in. But, if you write that add-in, you could win something on here for it.

Build a VS2010 Add-in and win a Zune[^]

Found this post that shows how to write a macro to change what is shown then it's collapsed.

Collapse All XML Comments in VB .NET or C#[^]

Of course, it's still collapsed, not hidden, but you could modify it to do what you're wanting.
I usually collapse everything. In VS 2005 go to [Edit -> Outlining -> Collapse to Definitions] to collapse everything to its base definition including the comments (you can also get there from the context menu). This has the same effect as using the little plus/minus sign in the left hand margin of the editor to collapse everything. Then you can expand just what methods you need, or if you're stepping through things in the debugger line by line it will auto-expand methods that you step into. There are some other options in the same menu item to so some other collapse/expand functions.
You could write a command-line utility that would remove all lines from files that start with whitespace and a triple slash ("///")... at least if you're working with C#. If your code is under version control, that shouldn't be a problem. Then you'd just have to drag a folder onto the tool and it would do it's magic... shouldn't take but an hour or two to write... less if you are already familiar with regular expressions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900