DEV Community

Krzysztof Kopieczek
Krzysztof Kopieczek

Posted on

Be more productive in Visual Studio with #TODO

Task List in Visual Studio is not very popular but it's one of the most simple and productive solutions to remember things to do. Let me show you how to use in everyday work.

How it works?

The idea is to just write simple // TODO in the code and the IDE will show this line of code in the Task List window. You can also write description afterwards to also have it in the Task List: // TODO need to add logic here. This is how it looks in the code:

if (someFlag == true)
    // TODO need to add logic here
Enter fullscreen mode Exit fullscreen mode

And that's how it looks in my IDE. I disabled all the additional columns because for me they are they are unnecessary.

Tips and tricks

  • double click on task will open that particular line in the code
  • I prefer to leave only the "Description" column and hide all the others, as they are irrelevant for me
  • add a number after //TODO and before description and you will be able to sort the list by priorities
  • add your initials after //TODO and use search if your colleagues refuse to handle their todos

When to use it?

  • when you are in the flow and would like to remember something for later
  • when you would like to maintain clear git commit log and you don't like to have big commits
  • when you notice a refactor opportunity/necessity but you would rather do it later

When not to use it?

  • this is not a feature to replace your kanban board
  • please don't use it to mark tasks you will maybe do in future sprint
  • don't delegate work to your colleagues with this Task List

How to show Task List in VS?

Just press Ctrl + Q and type "task list" or press Ctrl + W, T .

Top comments (0)