If you are using Visual Studio 2005 you might or might not be aware of the new debugger feature called Tracepoints. These are like Breakpoints, except that they do not stop the debugger at a given line in the source but trace something out.

This does not seem great on a first look but is actually very useful. Consider the alternative - if you did not have Tracepoints, what would you use? I guess you'd just put trace statements to your code and be done with it. But the statements are code, debug or not and once you're done with the debugging if you want to get rid of them you have to chase them all over the code.

Tracepoints are transient, just like Breakpoints and can be deleted at any point in time trivially from the Breakpoints panel where you can also see them listed. Tracepoints support tracing of several useful macro like constructs, including a stack trace, local variable values and much more.

But do not mistake Tracepoints for regular trace statements. The two are meant for a different purpose - trace statements can be rerouted to trace listeners and are used for things you want to be traced all the time (assuming other criteria like level of tracing has been met).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
0 Comments