Adding tokens to Visual Studio task list for code maintenance


Possibly worth a mention that TODO [as used in the task list] is a user definable token.

For info on how to define your own tokens [such as “NOTE” which can be used for code maintenance to mark code that’s is potentially platform or compiler implementation dependant] check out

Also if you place a value after each token in your comments [such as // TODO 1 … //TODO 32] and sort on the token name in the task list, you will get a sorted list of TODO’s in order of value you used rather than their position in the file.


// TODO 3
// TODO 1
// TODO 2
// FIXED 3
// FIXED 1
// FIXED 2

will give you a sorted task list that looks like

FIXED 1 class file line
FIXED 2 class file line
FIXED 3 class file line
TODO 1 class file line
TODO 2 class file line
TODO 3 class file line

Good luck and keep having fun :wink:


1 Like

Hi Barry,

Thanks for your post, the numbering is an interesting idea, however, it’s only seemingly useful for the first 9, assuming a 1 based, not 0 based initially numbering sequence…


// TODO: 1
// TODO: 12
// TODO: 2
// TODO: 4

…and doing this;

// TODO: 01
// TODO: 02
// TODO: 04
// TODO: 12

…which will extend the numbering to 99 (again, assuming 1 based sequencing) gets a bit noddy…

For less than 9 it could be handy, but typically, for myself at least, I tend to review any TODO items in the complete list and never really let them build up too much in the first place.

You could of course use the priority / project rank to help with the sorting also.

Thanks again for sharing though as it’s always interesting to see how these tools and features are used by others :slight_smile:

You are of course absolutely correct :slight_smile: of course if your using it to prioritise rather than sort tasks it becomes a lot more useful.


1 Like

Privacy & Terms