Thursday, August 19, 2010

Visual Studio – Tip #1

 

Like a lot of people, I find F1 in Visual Studio practically useless. I did read a suggestion to remap F1 to Debug->Run just so it did something useful.

Not wanting to waste a precious key I’ve decided to remap F1 to run the currently selected unit test in Resharper’s Unit Test Sessions window via the ReSharper_UnitTestSession_RunProcess command. Only problem is that windows needs to be selected before RunProcess will work. Visual Studio Macros to the rescue:

   1:      Sub Run_Current_Session()
   2:          DTE.Windows.Item("{B2BC9916-E3E6-43A8-AD5F-3BDB95F53DB5}").Activate()
   3:          DTE.ExecuteCommand("ReSharper_UnitTestSession_RunProcess")
   4:      End Sub

Moving on I’ve applied the same tactic to map F6 to ReSharper_UnitTestSession_DebugProcess. The productivity increase has been quite noticeable.

More random tips soon…

No comments:

Post a Comment