IDE Features I find useful – Visual Studio

This is a short but one of many of a series of blog posts I would like to make which mention some of the useful features of different IDEs which I make use of.  This one is for Visual Studio:

Full Screen

View –> Full Screen (Shift + Alt + Enter)

I love this feature, so say you have a certain layout set up for a particular type of project you are i.e. testing or deving etc… and you feel you would prefer some more space to code or design with, just hit Full Screen mode and you have it, then when you exit Full Screen mode, you layout persists.  Extremely useful

//TODO : bla bla bla (TASK LIST)

This is a feature which Visual Studio automatically recognizes and places in your Task List.  May be you are reviewing someones work and instead of rtackling each point as your come across it, you are able to go through all of it making the relevant //TODO: DELETE UNUSED CODE!!  then once finished Visual Studio has compiled a nice ordered task list for you to tackle.  Great organisational feature I reckon.

Bookmarks

View –> Other Windows –> Bookmark Window

I find this feature extremely handy in a couple of immediate situations:

  1. I am tracking down a procedure in code and it spans several classes, so I want to be able to jump quickly to the relevant parts so I can analyze.
  2. I am dealing with a single but extremely long code file and to preserve my sanity I set book marks while I scan down the code.  This way I am able to jump back and fourth to parts when i need.

You can also organize your book marks into folders.  I mean you could follow a procedural approach and really go deep with these and use every time you code.  I would say overkill but if you get used to something and it works, why stop?

Encapsulate Variables

For example, right click on a private variable and encapsulate.  I think this is an extremely handy feature BUT, I do prefer the one inside Net Beans which I have detailed here: Net Beans Encapsulation Feature.  I know you can get this functionality with Refactor program etc… but I would like to focus on out of the box things, oh and ignoring the extensibility lol if I am allowed to say that :-)

Conditional Breakpoints

I like the way I can set conditional break points based on the context of the currently running code, so that I can dig into exactly what I require.  For example, If I place a breakpoint inside a for iteration, I can state that i only want the break point to be hit when the counter, lets say x, is 3 . 

Split Screen Design/Markup and Split Horizontal Screen View

I think the first is new in Visual Studio 2008, and I do no actually have much use for it, as I very rarely look at the design for a web application in the GUI, but for the likes of WPF and windows development it is a really good feature and one which i am sure many people would not like to loose.

The second is when for example you drag an editor tab to the right or left and Visual Studio gives you the option to create another window horizontally next the the original.  This is good when you need to write code with immediate reference to another context.

prop tab tab

If you type prop and then hit the tab key twice you are very conveniently given a property stub like the following:

public int MyProperty { get; set; }

The type and the property name will be like a snippet where by you can tab into and out of each whilst editing, and when complete hit return and repeat the process.  It is not very useful how ever if you want to design components and you need to raise property changed events and such things.  I have no doubt this could be achieved through reflection but me personally I would simply use the complete property syntax if required.

Export Template

File –> Export Template

This is a nice tool, where you can export either a project template or export an item template.  For example lets say I create a new MVC application and add references to the Microsoft Patterns and Practices Enterprise Library.  I would then like to export this, so i have the option of creating a new MVC site which already contains all the references I need for the EntLib.

The second option for the Item Template, for example, lets say you create a custom web control and it will require control state and also notification of post backs.  You could override the two methods for the saving and loading of control state and implement the methods for the IPostBackDataHandler.  Export this ItemTemplate and in future you can now create web control  with the above already present saving you time.  Check out my post which details what i am talking about here : Custom ASP.NET Components

Funny yet I suppose still valid point: One place i used to work they actually exported a template for an ENUM!!  Is this necessary and productive or just sheer lazy.  Can I create a file and type an enum shell just as fast? hmmm I suppose I am adding one extra step doing it my way so in those terms it is more productive. 

Published Thursday, February 19, 2009 4:04 PM by REA_ANDREW
Filed under:

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required)