Tracepoints

Trace Points in VS2008
There's a really useful feature in VS2008 that allows you to insert a Tracepoint on a line of code. It's rather like a breakpoint, but instead of halting the execution it simply outputs the Tracepoint expression to the output window.

Trace Points in VS2005
"Trace Points" is just more accessible in VS2008 than it was in VS2005. In VS2005, simply drop a breakpoint (F9) and then right click on the breakpoint icon in the margin or on the line where the breakpoint itself resides. From the breakpoint popup select "When Hit" and check "Print Message". If "Continue Execution" is checked (which it is by default as soon as you select "Print Message"), you have a Tracepoint.

The default text for a new tracepoint ($THREAD: $FUNCTION or something) can be changed via the registry.

Links:
http://srstrong.blogspot.com/2008/06/tracepoints-in-vs2008.html
http://blogs.msdn.com/saraford/archive/2008/06/13/did-you-know-you-can-use-tracepoints-to-log-printf-or-console-writeline-info-without-editing-your-code-237.aspx