Written by Mark Pringle | Last Updated on Thursday, December 01, 2022
Visual Studio General Information
Popular Visual Studio Keyboard Shortcuts. Keyboard shortcuts help you to be more efficient and productive in your coding environment. You will find build, debug, editing, file, project, refactor, tools, view, and window Visual Studio keyboard shortcuts here.
See also: Visual Studio Code keyboard shortcuts.
Build
Commands | Keyboard shortcuts |
---|---|
Build solution | Ctrl+Shift+B |
Cancel | Ctrl+Break |
Compile | Ctrl+F7 |
Run code analysis on solution | Alt+F11 |
Debug
Commands | Keyboard Shortcuts |
---|---|
Break at function | Ctrl+B |
Break all | Ctrl+Alt+Break |
Delete all breakpoints | Ctrl+Shift+F9 |
Exceptions | Ctrl+Alt+E |
Quick watch | Ctrl+Alt+Q or Shift+F9 |
Restart | Ctrl+Shift+F5 |
Run to cursor | Ctrl+F10 |
Set next statement | Ctrl+Shift+F10 |
Start | F5 |
Start without debugging | Ctrl+F5 |
Step into | F11 |
Step out | Shift+F11 |
Step over | F10 |
Stop debugging | Shift+F5 |
Toggle breakpoint | F9 |
Edit
Commands | Keyboard Shortcuts |
---|---|
Break line | Enter [Text Editor, Report Designer, Windows Forms Designer] or Shift+Enter [Text Editor] |
Collapse to definitions | Ctrl+M, Ctrl+O [Text Editor] |
Comment selection | Ctrl+K, Ctrl+C [Text Editor] |
Complete word | Alt+Right Arrow [Text Editor, Workflow Designer] or Ctrl+Spacebar [Text Editor, Workflow Designer] or Ctrl+K, W [Workflow Designer] or Ctrl+K, Ctrl+W [Workflow Designer] |
Copy | Ctrl+C or Ctrl+Insert |
Cut | Ctrl+X or Shift+Delete |
Delete | Delete [Team Explorer] or Shift+Delete [Sequence Diagram, UML Activity Diagram, Layer Diagram] or Ctrl+Delete [Class Diagram] |
Find | Ctrl+F |
Find all references | Shift+F12 |
Find in files | Ctrl+Shift+F |
Find next | F3 |
Find next selected | Ctrl+F3 |
Format document | Ctrl+K, Ctrl+D [Text Editor] |
Format selection | Ctrl+K, Ctrl+F [Text Editor] |
Go to | Ctrl+G |
Go to declaration | Ctrl+F12 |
Go to definition | F12 |
Go to find combo | Ctrl+D |
Go to next location | F8 |
Insert snippet | Ctrl+K, Ctrl+X |
Insert tab | Tab [Report Designer, Windows Forms Designer, Text Editor] |
Line cut | Ctrl+L [Text Editor] |
Line down extend column | Shift+Alt+Down Arrow [Text Editor] |
Line open above | Ctrl+Enter [Text Editor] |
List members | Ctrl+J [Text Editor, Workflow Designer] or Ctrl+K, Ctrl+L [Workflow Designer] or Ctrl+K, L [Workflow Designer] |
Navigate to | Ctrl+, |
Open file | Ctrl+Shift+G |
Overtype mode | Insert [Text Editor] |
Parameter info | Ctrl+Shift+Spacebar [Text Editor, Workflow Designer] or Ctrl+K, Ctrl+P [Workflow Designer] or Ctrl+K, P [Workflow Designer] |
Paste | Ctrl+V or Shift+Insert |
Peek definition | Alt+F12 [Text Editor] |
Redo | Ctrl+Y or Shift+Alt+Backspace or Ctrl+Shift+Z |
Replace | Ctrl+H |
Select all | Ctrl+A |
Select current word | Ctrl+W [Text Editor] |
Selection cancel | Esc [Text Editor, Report Designer, Settings Designer, Windows Forms Designer, Managed Resources Editor] |
Surround with | Ctrl+K, Ctrl+S (available only in Visual Studio 2019 and earlier) |
Tab left | Shift+Tab [Text Editor, Report Designer, Windows Forms Editor] |
Toggle all outlining | Ctrl+M, Ctrl+L [Text Editor] |
Toggle bookmark | Ctrl+K, Ctrl+K [Text Editor] |
Toggle completion mode | Ctrl+Alt+Space [Text Editor] |
Toggle outlining expansion | Ctrl+M, Ctrl+M [Text Editor] |
Uncomment selection | Ctrl+K, Ctrl+U [Text Editor] |
Undo | Ctrl+Z or Alt+Backspace |
Word delete to end | Ctrl+Delete [Text Editor] |
Word delete to start | Ctrl+Backspace [Text Editor] |
File
Commands | Keyboard Shortcuts |
---|---|
Exit | Alt+F4 |
New file | Ctrl+N |
New project | Ctrl+Shift+N |
New web site | Shift+Alt+N |
Open file | Ctrl+O |
Open project | Ctrl+Shift+O |
Open web site | Shift+Alt+O |
Rename | F2 [Team Explorer] |
Save all | Ctrl+Shift+S |
Save selected items | Ctrl+S |
View in browser | Ctrl+Shift+W |
Project
Commands | Keyboard Shortcuts |
---|---|
Add existing item | Shift+Alt+A |
Add new item | Ctrl+Shift+A |
Refactor
Command | Keyboard shortcut [Special contexts] |
---|---|
Extract method | Ctrl+R, Ctrl+M |
Tools
Command | Keyboard shortcut [Special contexts] |
---|---|
Attach to process | Ctrl+Alt+P |
View
Commands | Keyboard Shortcuts |
---|---|
Class view | Ctrl+Shift+C |
Edit label | F2 |
Error list | Ctrl+\, Ctrl+E or Ctrl+\, E |
Navigate backward | Ctrl+- |
Navigate forward | Ctrl+Shift+- |
Object browser | Ctrl+Alt+J |
Output | Ctrl+Alt+O |
Properties window | F4 |
Refresh | F5 [Team Explorer] |
Server explorer | Ctrl+Alt+S |
Show smart tag | Ctrl+. or Shift+Alt+F10 [HTML Editor Design View] |
Solution explorer | Ctrl+Alt+L |
TFS Team Explorer | Ctrl+\, Ctrl+M |
Toolbox | Ctrl+Alt+X |
View code | Enter [Class Diagram] or F7 [Settings Designer] |
View designer | Shift+F7 [HTML Editor Source View] |
Window
Commands | Keyboard Shortcuts |
---|---|
Activate document window | Esc |
Close document window | Ctrl+F4 |
Next document window | Ctrl+F6 |
Next document window nav | Ctrl+Tab |
Next split pane | F6 |