How to mark important areas of code in Visual Studio?

We all sometimes have to write potentially dangerous, insecure, or simply poorly written code fragments. This is usually done in a hurry and needs to be rewritten later.

My question is: how can I easily and visually label this code in VS 2008?

For example, I use the Mindjet MindManager for planning, and I like how easily I can put a predefined graphic marker on any topic: a red flag for โ€œdangerous!โ€, A half-filled square for โ€œ50%โ€, etc. Then I can configure the filter and see that all my topics are marked as โ€œimportantโ€ or all topics with a progress> 75%.

I want to have something like this in Visual Studio. I know about the comments of "TODO:", but they do not have any markers and cannot be filtered by their value.

+6
visual-studio-2008
source share
3 answers

Take a look at Tools-> Options โ†’ Environment, Task List. He has:

  • Hack
  • Todo
  • canceled
  • UnresolvedMergeConflict

The first three have priority "Normal", the last has high priority. They can be sorted in the task list (View-> Task List). They can be customized and you can add your own.

ReSharper goes further by resolving keywords with regular expressions and appearing with a specific color and icon in its explorer.

+7
source share

I use โ€œTODOโ€, followed by the priority indicator โ€œP1โ€, โ€œP2โ€, etc. Then I can sort the TODO list in the correct order.

+5
source share

Let the compiler give warnings:

#if RELEASE #warning This has to rewritten later #endif 

http://msdn.microsoft.com/en-us/library/963th5x3(VS.71).aspx

+5
source share

All Articles