73

I've recently upgraded to Visual Studio 2012 and haven't have any problems except for the fact that comments beginning with "//todo" no longer show up in the task list. I have absolutely no idea on where to start looking for a solution to this problem as all of the keywords are too general.

I came across other similar questions where the answer was that the file wasn't open containing the //todo comment, but that is not the case for me. My todo comments do not show up even when the file is open in front of me.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
SamuelDavis
  • 3,312
  • 3
  • 17
  • 19

6 Answers6

139

Actually there is a dropdown control at the top of the "Task List" window and if you use the Visual Studio 2012 Dark Theme the dropdown looks like a label. If you click the "User Tasks" text, you will see "Comments" selection which lists your comments that contain "//todo".

Screenshot

Enlarge Image

Furkan Ekinci
  • 2,472
  • 3
  • 29
  • 39
41

** For Visual Studio 2012 **

  1. Select View -> Other Windows -> Task List.

enter image description here

  1. Select the option "Comments" in the Task List window.

    enter image description here

For Visual Studio 2008.

In the Task List window select the option "Comments".

enter image description here

Community
  • 1
  • 1
RckLN
  • 4,272
  • 4
  • 30
  • 34
  • 2
    @RckLN: I have the same problem but in windows-7 and VS2012. I followed your short and very-useful tutorial but the problem stands still and I can't see my "//TODO" comment in the Task List – McLan Jul 17 '13 at 15:38
  • @RckLN: I have figured it out, see my answer below. i was just missing the colon after the token. – McLan Jul 22 '13 at 10:29
8

You can view what you have set for tokens in Tools/Options under the Environment/Task List item in the left tree. You should have "TODO" in there which should detect //todo.

Peter Ritchie
  • 35,463
  • 9
  • 80
  • 98
  • 11
    This was not the correct answer, but it was very, very useful. The cause was a dropdown box containing the items 'comments' and 'user tasks'. As this new dark theme tucks away the dropdown icon, I believed it was simply a title and not a dropdown box. 'user tasks' was selected while what was needed was 'comments'. – SamuelDavis Sep 06 '12 at 03:29
7

Well, I was Having the same problem working in Windows-7 and Visual Studio 2012. All I had to do is change from:

// TODO

to

// TODO: do not forget the colon

McLan
  • 2,552
  • 9
  • 51
  • 85
  • 1
    The colon really should not affect the todo's appearing unless you have messed up your settings under tools-> options-> environment-> Task List – SamuelDavis Jul 22 '13 at 04:05
  • 2
    @SamuelDavis: the colon made all the difference for me. My settings were and still fine as after installing VS-2012 (fresh installation) I haven't touched them. In fact, I was able to add two more tokens but again I have to put the colon in order to be identified as "Task List" – McLan Jul 22 '13 at 10:27
  • 1
    @Rania-Boy yup, made all the difference for me, the lil bugg(...) – Aleksander Lidtke Sep 08 '13 at 21:56
  • 1
    @Irfan: for some of us the use of the colon is vital while it's not with others.I guess we are missing a very tiny small setting-detail, we need to find it out because it may be affecting other things as well .. – McLan Sep 13 '13 at 09:41
  • 2
    Thanks, that worked for me! Note that you have to have a space after the colon as well. –  Nov 17 '14 at 15:24
  • 1
    @Suda.nese Thanks ! Works for me but need exactly "// TODO:", case and space. – Jean Davy May 13 '15 at 07:13
3

Chalk this up to a stupid mistake, if it is not showing for you make sure your code doesn't look like this:

//int justfakecode=1; // TODO: FIX ME LATER

with the token as part of a commented out line. I herped the derp on this one.

peroija
  • 1,982
  • 4
  • 21
  • 37
2

Task list comments just shows current files TODO comments. This may be a bug of Visual Studio.

  • The original post references VS 2012. Since newer versions have been released, it is possible it is no longer a bug. Have you checked with 2015? Also, this question already has an accepted answer. The fact that you are providing (probably already known) details about 2+ year old software -- it is a little extraneous to SO. I did not flag, but I did downvote. – onebree Aug 18 '15 at 14:21
  • 2
    Confirmed in VS 2015 as well in some cases. Upvoted to counteract onebree's downvote. – Dan Bechard Apr 11 '16 at 15:34