Tips and Tricks for getting the most out of Visual Studio 2005 from my VDNUG and ADNUG sessions

Well I must admit that I learnt a lot getting this session together and as promised here is a summary of stuff that'll save you time and money!!

Oh and my admission, I borrowed, ok I stole a lot of the ideas from Anson Horton's "PDC Tips and Tricks" session and his blog, thanks Anson, yup he does know!! :-)

Check out his blog and the link to the video stream of his PDC session

Oh and Check out Bill McCathy's snippet edit here!!

So as requested these are some of the tips and tricks

Stepping through the "Go To Definition" History Stack

This is not very discoverable and it's definitely my favourite!!

Backward: Ctrl Shift *
Forwards: Ctrl Shift &

Backwards: Ctrl -
Forwards: Ctrl Shift -

Class Pane: Ctrl W C (W=Window, C = Class)
Property Pane: Ctrl W P (W=Window, P=Property)
Solution Pane: Ctrl W S (W=Window, S=Solution)

Outlining

Collapse All: Ctrl M O
Expand All: Ctrl M P
Toggle region: Ctrl M M

Refactoring

Shortcut key: Ctrl . (This works when you make a change to a declaration, a little red squiggle appears under the change, you can activate the refactoring it with the mouse or Ctrl . which is much faster!!)

Code Snippets

Activate a snippet by typing it's name followed by the Tab key. 

By default the C# snippets are installed in the the C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C# directory, the VB snippets are C:\Program Files\Microsoft Visual Studio 8\VB\Snippets\1033. 

Check them out, they are a pretty simple XML docs!!

If you make changes then the ideal place to save them is your My Documents\Visual Studio 2005\Code Snippets directory under the appropriate language section.

Debugging Attributes

Two really useful attributes that you can use to control the output of the debug variable watch window, cut down on clutter and see what you are really interested in.

You need to include the "System.Diagnostics" namespace and the two attributes are [DebuggerBrowsable(..)] and [DebuggerDisplay(..)]

see Anson's blog at https://blogs.msdn.com/ansonh/archive/2005/12/06/500823.aspx and

Tip#23: Stepping behavior customization

and

Tip#24: Value column customization

Cheers and enjoy, Dave