Fun with the Visual Studio Find Combo Box
It's interesting to note all the power of the find combo box in the Visual Studio command bar. It's easily one of the more useful controls I've ever used, yet it just sits there all quiet and unassuming. I've run into a lot of people who know one of two tricks that can be done in this box, so I thought I'd summarize them here.
Of course there's the basic find functionality:
- Find a string -- type the string and press Enter
- Find the next occurance of the string -- press Enter again
But then things get a little more interesting:
- Goto a line -- type the line number and press Ctrl + G
- Goto a file (either in your project or on the INCLUDE path) -- type the name of the file and press Ctrl + Shift + G
- Set a breakpoint on a function -- type the name of the function and press F9
- Get help -- type the keyword you want help on and press F1
And my personal favorite:
- Mini command window -- If you type > as the first character in the combo box, it will turn into a mini command window, complete with Intellisense! For instance, you could use the > kb command while debugging to get a stack trace. Or you could use the > nav https://msdn.microsoft.com command to go to MSDN.
Updated: To clear up confusion, I'm not talking about the combo box in the find dialog, but rather the combo box on the toolbar of VS itself. As one of the comments on this post points out, the keyboard shortcut to get there is Ctrl + D.
Comments
- Anonymous
February 27, 2004
The comment has been removed - Anonymous
February 27, 2004
Right you are -- the one on the toolbar. I'll update the original post to avoid more confusion -- Thanks!
-Shawn - Anonymous
May 17, 2004
Is there a list of the commands available in intellisense mode i.e kb etc - Anonymous
May 19, 2004
Hi Johan,
You can always get a list of the commands that currently work in your Visual Studio session by issuing an "> alias" command. For a list of predefined commands, check out "Pre-defined Visual Studio Command Aliases" on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxgrfpredefinedcommandlinealiases.asp
-Shawn - Anonymous
April 05, 2006
The comment has been removed - Anonymous
June 18, 2006
The shortcut Ctrl+D takes you there in find mode. Shortcut Ctrl+/ takes you there in command mode ('>' prepended)