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 shortcutsBuild and debug
Build the solution, start or stop debugging, set breakpoints, and step through code from the Visual Studio IDE.
| Action | Windows |
|---|---|
| Build the solution | CtrlShiftB |
| Cancel the build | CtrlBreak |
| Compile | CtrlF7 |
| Set a function breakpoint | CtrlB |
| Break all | CtrlAltBreak |
| Delete all breakpoints | CtrlShiftF9 |
| Open Exceptions | CtrlAltE |
| Open Quick WatchShift+F9 is also documented. | CtrlAltQ |
| Restart debugging | CtrlShiftF5 |
| Run to cursor | CtrlF10 |
| Set the next statement | CtrlShiftF10 |
| Start debugging | F5 |
| Start without debugging | CtrlF5 |
| Step into | F11 |
| Step out | ShiftF11 |
| Step over | F10 |
| Stop debugging | ShiftF5 |
| Toggle a breakpoint | F9 |
Editing and navigation
Complete code, format and comment selections, search the solution, navigate symbols, and manage editor text.
| Action | Windows |
|---|---|
| Break the line | Enter |
| Collapse to definitions | CtrlMthenCtrlO |
| Comment the selection | CtrlKthenCtrlC |
| Complete the current wordAlt+Right Arrow is also documented. | CtrlSpace |
| CopyCtrl+Insert is also documented. | CtrlC |
| CutShift+Delete is also documented. | CtrlX |
| Find | CtrlF |
| Find all references | ShiftF12 |
| Find in files | CtrlShiftF |
| Find the next match | F3 |
| Format the document | CtrlKthenCtrlD |
| Format the selection | CtrlKthenCtrlF |
| Go to a line | CtrlG |
| Go to declaration | CtrlF12 |
| Go to definition | F12 |
| Focus the Find combo | CtrlD |
| Go to the next location | F8 |
| Insert a snippet | CtrlKthenCtrlX |
| List members | CtrlJ |
| Navigate to a file, type, or symbolCtrl+Comma and Ctrl+T are also documented. | CtrlP |
| Open a file under the cursor | CtrlShiftG |
| Show parameter information | CtrlShiftSpace |
| PasteShift+Insert is also documented. | CtrlV |
| Peek the definition | AltF12 |
| RedoCtrl+Shift+Z and Shift+Alt+Backspace are also documented. | CtrlY |
| Replace | CtrlH |
| Select all | CtrlA |
| 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 right | CtrlDelete |
| Delete the word to the left | CtrlBackspace |
Files, projects, and views
Create or open files and projects, save work, inspect solution tools, and move through Visual Studio document windows.
| Action | Windows |
|---|---|
| Exit Visual Studio | AltF4 |
| Create a new file | CtrlN |
| Create a new project | CtrlShiftN |
| Open a file | CtrlO |
| Open a project | CtrlShiftO |
| Save all | CtrlShiftS |
| Save selected items | CtrlS |
| Open Class View | CtrlShiftC |
| Open Error List | Ctrl\thenCtrlE |
| Navigate backward | Ctrl- |
| Navigate forward | CtrlShift- |
| Open Object Browser | CtrlAltJ |
| Open Output | CtrlAltO |
| Open the Properties window | F4 |
| Open Solution Explorer | CtrlAltL |
| Open Toolbox | CtrlAltX |
| View code | F7 |
| View designer | ShiftF7 |
| Activate the document window | Esc |
| Close the document windowCtrl+F4 is also documented. | CtrlW |
| Activate the next document window | CtrlF6 |
| Open document window navigation | CtrlTab |
| Move to the next split pane | F6 |
Project and refactoring
Add project items, attach to a process, and apply the core refactoring command from the General profile.
| Action | Windows |
|---|---|
| Add an existing item | ShiftAltA |
| Add a new item | CtrlShiftA |
| Extract a method | CtrlRthenCtrlM |
| Attach to a process | CtrlAltP |
| Remove and sort usings | CtrlRthenCtrlG |
| Surround with | CtrlKthenCtrlS |