Visual Studio Commands

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Visual Studio Commands on docs.microsoft.com. Visual Studio commands allow you to invoke a command from the Command window, Immediate window, or Find/Command box. In each case, the greater than sign (>) is used to indicate that a command rather than a search or debug operation is to follow.

You can find a complete list of commands and their syntax in the Keyboard, Environment Options dialog box.

The escape character for Visual Studio commands is a caret (^) character, which means that the character immediately following it is interpreted literally, rather than as a control character. This can be used to embed straight quotation marks ("), spaces, leading slashes, carets, or any other literal characters in a parameter or switch value, with the exception of switch names. For example,

>Edit.Find ^^t /regex  

A caret functions the same whether it is inside or outside quotation marks. If a caret is the last character on the line, it is ignored.

In localized versions of the IDE, command names can be entered either in the native language of the IDE or in English. For example, you can type either File.NewFile or Fichier.NouveauFichier in the French IDE to execute the same command.

Many commands have aliases. For a list of command aliases, see Visual Studio Command Aliases.

The following commands take arguments and/or switches.

Command NameDescription
Add Existing ItemAdds an existing file to the current solution and opens it.
Add Existing ProjectAdds an existing project to the current solution.
Add New ItemAdds a new solution item, such as an .htm, .css, .txt, or frameset to the current solution and opens it.
AliasCreates a new alias for a complete command, complete command and arguments, or even another alias.
Evaluate StatementEvaluates and displays the given statement.
FindSearches files using a subset of the options available on the Find and Replace control.
Find in FilesSearches files using a subset of the options available on the Find in Files.
Go ToMoves the cursor to the specified line.
List Call StackDisplays the current call stack.
List DisassemblyBegins the debug process and allows you to specify how errors are handled.
List MemoryDisplays the contents of the specified range of memory.
List ModulesLists the modules for the current process.
List RegistersDisplays a list of registers.
List SourceDisplays the specified lines of source code.
List ThreadsDisplays a list of the threads in the current program.
Log Command Window OutputCopies all input and output from the Command window into a file.
New FileCreates a new file and adds it to the currently selected project.
Open FileOpens an existing file and allows you to specify an editor.
Open ProjectOpens an existing project and allows you to add the project to the current solution.
Open SolutionOpens an existing solution.
PrintEvaluates the expression and displays the results or the specified text.
Quick Watch CommandDisplays the selected or specified text in the Expression field of the Quick Watch dialog box.
ReplaceReplaces text in files using a subset of the options available on the Find and Replace control.
Replace in FilesReplaces text in files using a subset of the options available in the Replace in Files.
Set Current Stack FrameAllows you to view a particular stack frame.
Set Current ThreadAllows you to view a particular thread.
Set RadixDetermines the number of bytes to view.
ShellLaunches programs from within Visual Studio as though the command has been executed from the command prompt.
ShowWebBrowser CommandDisplays the URL you specify in a Web browser window either within the integrated development environment (IDE) or external to the IDE.
StartBegins the debug process and allows you to specify how errors are handled.
PathSets the list of directories for the debugger to search for symbols.
Toggle BreakpointTurns the breakpoint either on or off, depending on its current state, at the current location in the file.
Watch CommandCreates and opens a specified instance of a Watch window.

Command Window
Find/Command Box
Visual Studio Command Aliases

Show: