Microsoft Visual Studio keyboard shortcuts
Windows · version 2022 (17.14) · 55 shortcuts
Hotkeypediahotkeypedia.com
Build and debug
- Build the solutionCtrlShiftB
- Start debuggingF5
- Start without debuggingCtrlF5
- Stop debuggingShiftF5
- Restart debuggingCtrlShiftF5
- Toggle a breakpointF9
- Step overF10
- Step intoF11
- Step outShiftF11
- Run to the cursorCtrlF10
- Apply Hot Reload changesAltF10
Navigation
- Go to anything (files, types, members)CtrlTorCtrl,
- Search Visual Studio commands and settingsCtrlQ
- Go to a lineCtrlG
- Go to the definitionF12
- Peek the definitionAltF12
- Go to the implementationCtrlF12
- Find all referencesShiftF12
- Navigate backwardCtrl-
- Navigate forwardCtrlShift-
- Switch between open documentsCtrlTab
- Close the documentCtrlF4
- Toggle a bookmarkCtrlK,CtrlK
- Next bookmarkCtrlK,CtrlN
Editing
- Quick actions and refactoringsCtrl.orAltEnter
- RenameCtrlR,CtrlR
- Extract methodCtrlR,CtrlM
- Comment the selectionCtrlK,CtrlC
- Uncomment the selectionCtrlK,CtrlU
- Format the documentCtrlK,CtrlD
- Format the selectionCtrlK,CtrlF
- Duplicate the line or selectionCtrlD
- Delete the lineCtrlShiftL
- Move the line upAlt↑
- Move the line downAlt↓
- Add the next match to the selectionAltShift.
- Select every matchAltShift;
- Show IntelliSense completionsCtrlSpaceorCtrlJ
- Show parameter infoCtrlShiftSpace
- Surround with a snippetCtrlK,CtrlS
- Insert a snippetCtrlK,CtrlX
- Collapse or expand the blockCtrlM,CtrlM
- Collapse or expand all blocksCtrlM,CtrlL
Search and windows
- FindCtrlF
- ReplaceCtrlH
- Find in filesCtrlShiftF
- Replace in filesCtrlShiftH
- Show Solution ExplorerCtrlAltL
- Show the Error ListCtrl\,E
- Show the Output windowCtrlAltO
- Show the terminalCtrl`
- Add a new itemCtrlShiftA
- New projectCtrlShiftN
- Save allCtrlShiftS
- Full screenAltShiftEnter