4

Since there isn't a page for 2012 and 2010 is pretty close I used these instructions

I wrote the below but I see an empty task list. How do I properly do this? Note: "Enumerate Comment Tasks" is set to true.

void myfunc() {
    ...
    // TODO Fix this function.
    ...

2 Answers2

8

VS 2012, 2010, 2008: When you switch to the Task List window, the topmost control is a drop-down list. Switch it from "User tasks" to "Comments". Your TODOs in your comments should appear. In case of C++ there are some constraints, look at my specific C++ answer.

Csaba Toth
  • 10,021
  • 5
  • 75
  • 121
  • It's true for VS2008 and VS2010, just checked. – Csaba Toth Apr 17 '13 at 20:16
  • 2
    Note you can also configure which tokens show up under Tools -> Options -> Environment -> Task List. The defaults are TODO, HACK, and UNDONE. – Jimmy Apr 17 '13 at 23:00
  • oh snap I did not see that down arrpw/dropdown. wow. BUT for some reason (@#$%^!!) it still doesn't list. I did a rebuild and I don't see it there. I'm using C++ if that helps. +1 cause now i'm looking at the right place –  Apr 17 '13 at 23:15
  • @acidzombie24: I tried it with a C++ project now, and it doesn't show up. That's weird. Hopefully it's not another feature which is supported for C# but not for C++. – Csaba Toth Apr 17 '13 at 23:57
  • @CsabaToth: The thing is, I see it enabled in the C++ formatting section. :x. Maybe its broken in 2012 –  Apr 18 '13 at 01:32
  • @acidzombie24: It works for me now, but with limitations: just for the currently open files. I guess this is by design, for performance reasons? See my specific C++ answer. – Csaba Toth Apr 18 '13 at 06:34
1

For C++ the enumeration is turned off by default for performance reasons: link. See also: link. But if I enable the switch mentioned in the other StackOverflow topic, I still didn't see all of the TODOs. I have to actually open up a file with TODOs, and then I see only the TODOs in the currently open files.

Community
  • 1
  • 1
Csaba Toth
  • 10,021
  • 5
  • 75
  • 121
  • Maybe there's another switch somewhere to enumerate everything? I have to tell that I was on the other side too wen I was a CAD developer: so humongous project that every "feature" was bogging. So I can understand it's turned off. But it should be able to be turned on. – Csaba Toth Apr 18 '13 at 00:08
  • Workaround can be: Find in Files search with Match Case, Whole Words for "TODO". Visual Studio's Find window is very ergonomic, I just double click and I jump to the line. – Csaba Toth Apr 18 '13 at 00:14