Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make TODO comments show up in the task list for C++ projects in Visual Studio 2010?

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?

like image 363
Chris Simmons Avatar asked Dec 26 '10 20:12

Chris Simmons


People also ask

How do you add a TODO comment in Visual Studio?

Visual Studio Tracks Your “// TODO” Comments From within Visual Studio Go to View -> Task List. This will display the Task List window and show you any area of your open Solution that has existing comments that start with // TODO . You can filter down to your Current Project, Current Document, or Open Documents.

What is task list in Visual Studio?

Visual Studio provides several tool windows helping developers to keep track of their project. Task list collects information from source code, so it is available at one place all together.

How do you make a todo in HTML?

TODO comments are just code comments that start with a single string of capital letters like // TODO or // FIXME.


2 Answers

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.

like image 166
Hans Passant Avatar answered Sep 24 '22 23:09

Hans Passant


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

like image 39
bowman han Avatar answered Sep 25 '22 23:09

bowman han