Using the Find/Command Box Keyboard Shortcuts

Keyboard:  CTRL + D (find); CTRL + G (go to line); CTRL + SHIFT + G (go to line); F9
Command:  Edit.GoToFindCombo; Edit.GoTo; Edit.OpenFile; Debug.ToggleBreakpoint
Versions:  2008,2010
Published:  9/26/2010
Code:  vstipFind0019

 

Make sure to check out the Windows Phone Developer Portal!

 

We have looked at the Find / Command box in a variety of places.  Recall that this toolbar item is located to on the Standard toolbar by default:

image

 

I thought it would be a good idea to consolidate the keyboard shortcuts of this wonderful tool into one place.  Let’s get started!

 

 

 

Find (CTRL + D)

First and foremost the Find / Command box is used to find strings.  Just press CTRL + D to go to box and type in your search term:

image

 

When you press ENTER it will search for your string using the settings from Quick Find (CTRL + F) as it searches.  Pressing ENTER again will find the next instance and so on. 

 

 

 

Go To Line (CTRL + G)

When in the Find / Command box you can type any line number:

image

 

Press CTRL + G and you will be taken to the line number that you entered.

 

 

 

 

Go To File (CTRL + SHIFT + G)

Type in any file name that is in your solution or in the INCLUDE path:

image

 

Use CTRL + SHIFT + G to go to the file.  If the file isn’t open then this will open the file first.

 

 

 

 

Set a Breakpoint (F9)

When you enter any function name:

image

 

Then press F9, Visual Studio will set a breakpoint on the function:

image

 

A couple of things to note:  (1) Pressing F9 again will NOT turn off the breakpoint, i.e. it’s not a toggle and (2) it will only work with open documents.