The Task List in Visual Studio is apparently very well hidden. But if you’ve ever put a “TODO” comment in some code in Visual Studio, you’ve already started to use it! This is a feature of Visual Studio that has been around since at least VS 2005 and yet I talk to so many developers who have no knowledge if its existence!
Enabling the Task List in Visual Studio
Go to View, and click on “Task List”, it is usually about half way down the list.
You will then be presented with the Tasks window. Pop open the drop down at the top and choose “Comments”:
And then you can see all of the TODOs in your code:
Behind the Curtain
OK, it’s not really magic. All Visual Studio is doing is hunting through your source for any comments which begin with “TODO”:
- Case doesn’t matter in Visual Basic and C#
- Whitespace is ignored
I really is as simple as that. The only minor fly in the ointment is C++, which is case sensitive (use “TODO”) and comes with Comments tasks turned off by default… But don’t worry! They’re easy to turn back on again. Go to Tools and Options, then Text Editor, C/C++, Formatting, Miscellaneous and find “Enumerate Comment Tasks” – set it to true. Then you can join in the fun.
It can often be fun opening up old legacy solutions in Visual Studio and seeing just how many “TODOs” there are.
And by “fun”, I mean morbidly depressing. Especially if you’re the chump who has to maintain it all!!!