Visual Studio keyboard shortcuts

Visual Studio's General profile includes distinct defaults for building, debugging, editing, files, projects, refactoring, views, and document windows. This Windows reference keeps the common commands and their context notes readable instead of flattening every context-specific command into one list.

Windows · 78 shortcuts

Build and debug

Build the solution, start or stop debugging, set breakpoints, and step through code from the Visual Studio IDE.

ActionWindows
Build the solutionCtrlShiftB
Cancel the buildCtrlBreak
CompileCtrlF7
Set a function breakpointCtrlB
Break allCtrlAltBreak
Delete all breakpointsCtrlShiftF9
Open ExceptionsCtrlAltE
Open Quick WatchShift+F9 is also documented.CtrlAltQ
Restart debuggingCtrlShiftF5
Run to cursorCtrlF10
Set the next statementCtrlShiftF10
Start debuggingF5
Start without debuggingCtrlF5
Step intoF11
Step outShiftF11
Step overF10
Stop debuggingShiftF5
Toggle a breakpointF9

Editing and navigation

Complete code, format and comment selections, search the solution, navigate symbols, and manage editor text.

ActionWindows
Break the lineEnter
Collapse to definitionsCtrlMthenCtrlO
Comment the selectionCtrlKthenCtrlC
Complete the current wordAlt+Right Arrow is also documented.CtrlSpace
CopyCtrl+Insert is also documented.CtrlC
CutShift+Delete is also documented.CtrlX
FindCtrlF
Find all referencesShiftF12
Find in filesCtrlShiftF
Find the next matchF3
Format the documentCtrlKthenCtrlD
Format the selectionCtrlKthenCtrlF
Go to a lineCtrlG
Go to declarationCtrlF12
Go to definitionF12
Focus the Find comboCtrlD
Go to the next locationF8
Insert a snippetCtrlKthenCtrlX
List membersCtrlJ
Open a file under the cursorCtrlShiftG
Show parameter informationCtrlShiftSpace
PasteShift+Insert is also documented.CtrlV
Peek the definitionAltF12
RedoCtrl+Shift+Z and Shift+Alt+Backspace are also documented.CtrlY
ReplaceCtrlH
Select allCtrlA
Toggle a line commentThe current command is available in Visual Studio 2022 17.11 and later.Ctrl/
UndoAlt+Backspace is also documented.CtrlZ
Delete the word to the rightCtrlDelete
Delete the word to the leftCtrlBackspace

Files, projects, and views

Create or open files and projects, save work, inspect solution tools, and move through Visual Studio document windows.

ActionWindows
Exit Visual StudioAltF4
Create a new fileCtrlN
Create a new projectCtrlShiftN
Open a fileCtrlO
Open a projectCtrlShiftO
Save allCtrlShiftS
Save selected itemsCtrlS
Open Class ViewCtrlShiftC
Open Error ListCtrl\thenCtrlE
Open Object BrowserCtrlAltJ
Open OutputCtrlAltO
Open the Properties windowF4
Open Solution ExplorerCtrlAltL
Open ToolboxCtrlAltX
View codeF7
View designerShiftF7
Activate the document windowEsc
Close the document windowCtrl+F4 is also documented.CtrlW
Activate the next document windowCtrlF6
Open document window navigationCtrlTab
Move to the next split paneF6

Project and refactoring

Add project items, attach to a process, and apply the core refactoring command from the General profile.

ActionWindows
Add an existing itemShiftAltA
Add a new itemCtrlShiftA
Extract a methodCtrlRthenCtrlM
Attach to a processCtrlAltP
Remove and sort usingsCtrlRthenCtrlG
Surround withCtrlKthenCtrlS

Make a printable Visual Studio sheet