DataTips to improve Visual Studio debugging

[DebuggerDisplay(“Employee ( {FullName} )”)]
public class Employee {
public string FullName;
}

With this simple attribute, Visual Studio will display a one-line view of an object, so that you don’t have to drill down to get to the important information.

You can customize the Visual Studio debugger further with other other attributes,but they more involved. DebuggerDisplay costs nil.

 

Another useful tip for using Visual Studio is the CTRL + . (dot) expands the SmartTags menu. For example, if you rename a method, a small SmartTag icon appears, which once expanded lets you perform a Rename refactoring.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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: