15

I'm trying to get my TODO comments to show up in the task list in Visual Studio 2010 for a C++ project, but they don't. I looked at this, but see no caveats other than the TODO comments need to be in the currently-open file. For example, creating a new Win32 console app places this:

// TODO: reference additional headers your program requires here

in a new file, stdafx.h. However, there's nothing in the task list.

I have "Comments" chosen from the drop-down in the task list, but it's always empty. And it's not this problem; I can open the file and be looking at the TODO comment in the code editor and no task is shown. This is not a problem for C# projects as TODO comments show up as designed in those projects; this appears to be an issue specific to C++ projects.

What else can I check?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Chris Simmons
  • 6,924
  • 5
  • 31
  • 47

2 Answers2

30

This is off by default 'for performance reasons'. Tools + Options, Text Editor, C/C++, Formatting, Miscellaneous, Enumerate Comment Tasks = True. Feedback article is here.

Also note the comment in the MSDN article about task list comments:

With Visual C++ projects, the Task List displays only the comments that are found in the file that is currently active in the editor.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • 1
    Ok I found it, on VS2013 Express it can be found at: Tools->Options->Text Editor->C/C++->View-> Miscellaneous->Enumerate Comment Tasks. The problem is, it is already set to true. – Neon Warge Jun 28 '15 at 17:23
  • 1
    @NeonWarge same for me. it is set to true but the tasks from the comments are showing up only if the document is opened :/ – Yousuf Azad Aug 05 '16 at 03:21
  • @sami1592 true, its hard to deal with especially if you want to see your todos for those code. Well I guess maybe I am using it wrong, maybe they intentionally wanted you to view TODOs only for the opened file. Though, It wouldn't hurt them to include a window that shows all TODOs in the project. – Neon Warge Aug 05 '16 at 04:45
3

This is what I got from MSDN:

Hi,

The ‘comments tasks’ in the Task List window is turned off by default due to performance reasons. You can turn this feature on from

Tools->Options->Text Editor->C/C++->Formatting-> Miscellaneous->Enumerate Comment Tasks.

We apologize for the inconvenience.

Thanks Sumit Kumar Visual C++ Team

Community
  • 1
  • 1
bowman han
  • 1,097
  • 15
  • 25