Skip to content

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

January 5, 2011

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

Sara Ford’s Weblog

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

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.

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

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

 

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: