Cool feature in Visual Studio 2005: Tracepoints
That's so obvious, I cannot beleive this feature was not there before!
Idea is really simple (and great!) - perform some action when code line is hit.
How many times you temporary modified a source code just to check how some var is changing by inserting ::OutputDebugString() or something similar.
Now that technique is obsolete. Just insert a tracepoint to that code line, and specify a template for message you want to see in Output window. In addition in the message template you can show Thread ID (for MT debugging), CPU Tick Count (for simple profiling), Call Stack, etc.
To insert tracepoint
Right-click on a line of code, choose Breakpoint \ Insert Tracepoint.
It will show dialog with all instructions.
For more details check MSDN article How to: Specify a Tracepoint/Breakpoint Action
Idea is really simple (and great!) - perform some action when code line is hit.
How many times you temporary modified a source code just to check how some var is changing by inserting ::OutputDebugString() or something similar.
Now that technique is obsolete. Just insert a tracepoint to that code line, and specify a template for message you want to see in Output window. In addition in the message template you can show Thread ID (for MT debugging), CPU Tick Count (for simple profiling), Call Stack, etc.
To insert tracepoint
Right-click on a line of code, choose Breakpoint \ Insert Tracepoint.
It will show dialog with all instructions.
For more details check MSDN article How to: Specify a Tracepoint/Breakpoint Action
Labels: visual studio, vs2005
0 Comments:
Post a Comment
<< Home