Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: .NET
Expertise: Intermediate
Apr 20, 2009

New IDE Feature in VS 2008: Tracepoints

When editing in Visual Studio, you would normally write a MessageBox.Show or a Console.Writeline to log the value of a variable. But you can eliminate that work now. Instead, try taking advange of a new debugging feature in Visual Studio 2008 called "Tracepoints."

To use the feature, right-click on the left most part of the Code Editor pane in the IDE at the line where you want to log the variable's value. Select "Breakpoints" from the context menu, and then choose "Insert Tracepoint." You'll see a Tracepoint dialog. Enter the variable you want to log, and change the default descriptive text (for logging the content of the variable) in the dialog. Close the dialog.

Doing this inserts a "diamond point" on the left edge of the editor window at the selected line. When you execute the application, the output of the new Tracepoint (the variable value and descriptive text) will appear in the Output window.

Srinath MS
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap