14

Using Visual Studio 2010 Express

I have a task list open and on filter setting comments.

It does not show any inline

// TODO whatever

comments at all, whether project or file specific. Any idea why? Do I need to set the tokens manually or something?

IamPolaris
  • 1,021
  • 2
  • 10
  • 19
  • possible duplicate of [View all TODO items in Visual Studio](http://stackoverflow.com/questions/2165120/view-all-todo-items-in-visual-studio) – TylerH Apr 22 '15 at 21:29

3 Answers3

25

According to this Connect issue, it's turned off by default for C++ for performance reasons.

To enable this feature go to Tools -> Options -> Text Editor -> C/C++ -> Formatting -> Miscellaneous, and set Enumerate Comment Tasks to True.

Ahmad Mageed
  • 94,561
  • 19
  • 163
  • 174
  • 2
    Yes but both in VS 2010 and VS 2012 you only see those TODOs which are contained in the currently open files. Is there another switch to get all the TODOs in a solution? – Csaba Toth Apr 18 '13 at 00:18
  • 2
    @CsabaToth No, I don't think there is. For a large project this would probably result in a huge number of items and could impact perf. I suspect that's why this is not enabled. – Ade Miller Oct 04 '13 at 15:02
  • It helped me to. Sadly it causes VS 2012 to hang sometimes with "something in background" message. – JohnTheHero Nov 07 '13 at 20:50
  • 2
    for me in VS13 it was in `Tools -> Options -> Text Editor -> C/C++ -> View-> Miscellaneous` – Yousuf Azad Aug 05 '16 at 03:19
  • @sami1592 for me(VS15 - Community) that option was set True by default but it reports only opened source files. The description says **"Scan open source files for TODO... and report them in the Task List window"**. Is it same for you? – JaeJun LEE Jun 20 '17 at 12:18
2

I'm using VS2015(Community).

For me, VS seems to search tasks only in opened source files.

Pressing Ctrl+K+H adds the current line into the TaskLists and it wouldn't be hidden even if the source file is not opened.

You can do this from Edit->Bookmarks->Add Task List Shortcut also.

JaeJun LEE
  • 1,234
  • 3
  • 11
  • 27
2

I'm using VS2017(Community).

My Enumerate Comment Tasks already set to True, still not working.

However, after I set it to False -> press OK button to close Option dialog -> open Option dialog again -> set the flag to True, it works now.