Skip to content

Tip 7.14: You can use tracepoints to log PrintF() or Console.WriteLine() info without editing your code

July 10, 2014

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

Right-click in the editor wherever you want to insert a tracepoint, select Breakpoint, and then select Insert Tracepoint.

vstip7140

This brings up the tracepoint dialog box, which gives you some helpful default settings. But for this example, the really helpful default is in the descriptive text for logging the contents of a variable.

vstip7140a

You’ll notice that the editor shows a diamond instead of a circle.

vstip7140b

And the tracepoints are logged in the Output window’s Debug pane.

vstip7140c

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: