You can enable a TracePoint by using F9 to set
a breakpoint on a line of code, and then right-click on the breakpoint and
choose the “When Hit…” context menu command:

This will bring up the following dialog –
which allows you to specify what should happen when the breakpoint is hit:

Above we’ve specified that we want to print a
trace message anytime the breakpoint condition is met. Notice that we’ve
specified that we want to output the value of the local variable “x” as part of
the message. Local variables can be referenced using the {variableName}
syntax. There are also built-in commands (like $CALLER, $CALLSTACK, $FUNCTION,
etc) that can be used to output common values within your trace messages.
Above we’ve also checked the “continue
execution” checkbox at the bottom – which indicates that we do not want the
application to break in the debugger. Instead it will continue running –
with the only difference being that our custom trace message will be output
each time the breakpoint condition is met.
And now when we run the application, we’ll
find that our custom trace messages automatically show up in the “output” window
of Visual Studio – allowing us to follow the recursive behavior of the
application:

You can alternatively wire-up a custom trace listener to
your application - in which case the messages you print from your TracePoints
will be piped to it instead of the VS output window.