Visual Studio 2010 – My Favorite Features

Finally it’s out with loads of new features. I just love the way it looks. Here are some of the cool features I like most:

Start Page

Visual Studio shell has been completely rewritten in WPF. Start Page is also rewritten using XAML and it provides ways to customize.

Here is the link about the Start Page on MSDN.

Pin the important Projects

Now users have an option to pin the important project right on the Start Page so it will always stay on top.

01_pin_03

 

Open the Project Folder

I often had to struggle with finding the folder for the project but now it’s just one click away from the Start Page:

01_Pin_02

 

Zoom

This is a new interesting feature introduced in Visual Studio 2010. Now users can Ctrl + Mouse wheel to increase and decrease the Font size. It’s very useful for presentation when you need to enhance the font size.

03_zoom

 

Box Selection

In Visual Studio 2008 we have an option to select the rectangular region by holding down the ALT key. In Visual Studio 2010 users can not only select a rectangular region but they can also type into a box selection to insert the text in every line. To do this hold down the ALT key and use mouse to make a vertical selection like this:

04_boxselect1

 

And then start typing and it should look like this:04_boxselect2

 

References Highlighting

This is another exciting IDE feature which makes the life much easier. When you click a symbol in the Code Editor, all instances of the symbol are highlighted in the document. Click here for the MSDN link for more details.

05_ref01

 

Also you can navigate through the highlights by using CTRL+SHIFT+DOWN ARROW or CTRL+SHIFT+UP ARROW

 

How to turn off?

Go to Tools > Options > Text Editor > Basic > VB Specific.  Uncheck the "Enable highlighting of references and keywords" option. For C#, go to Tools > Options > Text Editor > C# > Advanced.  Uncheck the "Highlight references to symbol under cursor" option

05_ref02

 

Generate from Usage

Here is one of my favorite features which let you use the classes and members before you define them.  Here is the MSDN definition:

The Generate From Usage feature enables you to use classes and members before you define them. You can generate a stub for any class, constructor, method, property, field, or enum that you want to use but have not yet defined. You can generate new types and members without leaving your current location in code.

 

Assume you are writing the following code but as you can see that the Vehicle class doesn't exist yet.

06_generate1

But if you mouse over the Vehicle, it shows you the following option:

06_generate2

 

And if you click the “Generate Class Vehicle”, it will automatically create the Vehicle class for you. You can also create method and properties easily. Here is another example where user is trying to use a property which doesn’t exist and Visual Studio highlights the line :

06_generate3 

 

And if you mouse over the clsCar.Speed , you have an option to auto generate it:

06_generate4

 

Debugging Improvements – Breakpoints

Visual Studio 2010 provides several improved debugging features. Now using Visual Studio 2010 users can label any breakpoints. These breakpoints can be searched later during the debugging.

How to add a Label to a breakpoint

To add a label to a break point, right click on the breakpoint and choose Edit Labels and then add the desired label as shown below:

07_breakpoints_02

 

How to search a Label

You may search the label in the Breakpoint Window as shown below:

07_breakpoints_01

 

Save and Load Breakpoints

In Visual Studio 2010 users can save the breakpoints to a XML file for a later use. The Breakpoint window provides options to Load and Save the breakpoints from a XML file. Always remember that the reloading of the breakpoint based on the line numbers.

 

Debugging Improvements – DataTip Pinning

In Visual Studio 2010 introduces another new cool feature called DataTip Pinning. This feature enable users to track the variable and expression values during the debugging right on the screen.

How to pin a  DataTip

When you mouse hover, Visual Studio automatically highlights the variable and shows option to pin the DataTip

08_DataTip

 

Once user click on the Pin image, Visual Studio automatically adds the DataTip.

08_DataTip_01  

 

Here is an excellent article about the Debugging improvements in Visual Studio 2010.

Credit for this POST goes to RAVI VERMA. Stay Tuned for PART 2 …

No Comments