We all sometimes have to write potentially dangerous, unsafe or just poorly written piece of code. Usually it is done in a hurry and needs to be rewritten later.
My question is: How can I easily and visually mark this code in VS 2008?
For example, I'm using Mindjet MindManager for planning and I love how easily I can put a predefined graphical marker on any topic: red flag for "dangerous!", half-filled square for "50% done", etc. Then I can set up a filter and see i.e. all my topics marked as "important" or all topics with progress > 75%.
I want to have something like that in Visual Studio. I know about "TODO:" comments, but they do not have any markers and cannot be filtered by their importance.
Use the #Region directive to specify a block of code to expand or collapse when using the outlining feature of Visual Studio IDE. You can place, or nest, regions within other regions to group similar regions together.
By marking a section of code (regardless of any logical blocks) and hitting CTRL + M + H you'll define the selection as a region which is collapsible and expandable.
Take a look at Tools->Options-->Environment, Task List. It has:
The first three have "Normal" priority, the last has high priority. These can be sorted in the Task List (View->Task List). These can be customized, and you can add your own.
ReSharper goes further, permitting the keywords to match via regular expressions, and to show up with a particular color and icon in their To-do Explorer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With