Visual Studio Shortcuts for Windows

Keyboard shortcuts for Visual Studio on Windows. Covers editing, debugging, refactoring, navigation, testing, and window management.
Key label style

Analyze

Navigate backward
Alt+Shift+3
Navigate forward
Alt+Shift+4

Architecture

New diagram
Ctrl+\,Ctrl+N

Azure

Retry mobile service script operation
Ctrl+Num *,Ctrl+R
Show mobile service script error details
Ctrl+Num *,Ctrl+D

Build

Build selectionVisual Studio 2019 only.
Ctrl+B
Build solution
Ctrl+Shift+B
CancelThe Pause/Break key.
Ctrl+Pause
Compile
Ctrl+F7
Run code analysis on solution
Alt+F11

Class View context menus

Properties
Alt+Enter

Debug

Apply code changes
Alt+F10
Attach to process
Ctrl+Alt+P
Autos
Ctrl+Alt+V,A
Break allThe Pause/Break key.
Ctrl+Alt+Pause
Breakpoints
Ctrl+Alt+B
Call stack
Ctrl+Alt+C
Delete all breakpoints
Ctrl+Shift+F9
Exceptions
Ctrl+Alt+E
Launch
Alt+F2
Disassembly
Ctrl+Alt+D
Dom explorer
Ctrl+Alt+V,D
Enable breakpoint
Ctrl+F9
Function breakpointCtrl+K, B in Visual Studio 2019; Ctrl+B in Visual Studio 2017.
Ctrl+K,B
or
Ctrl+B
Go to previous call or IntelliTrace event
Ctrl+Shift+F11
Start diagnostics
Alt+F5
Immediate
Ctrl+Alt+I
IntelliTrace calls
Ctrl+Alt+Y,T
IntelliTrace events
Ctrl+Alt+Y,F
JavaScript console
Ctrl+Alt+V,C
Locals
Ctrl+Alt+V,L
Process combo
Ctrl+5
Stack frame combo
Ctrl+7
Thread combo
Ctrl+6
Toggle current thread flagged state
Ctrl+8
Toggle flagged threads
Ctrl+9
Memory 1
Ctrl+Alt+M,1
Memory 2
Ctrl+Alt+M,2
Memory 3
Ctrl+Alt+M,3
Memory 4
Ctrl+Alt+M,4
Modules
Ctrl+Alt+U
Parallel stacks
Ctrl+Shift+D,S
Parallel watch 1
Ctrl+Shift+D,1
Parallel watch 2
Ctrl+Shift+D,2
Parallel watch 3
Ctrl+Shift+D,3
Parallel watch 4
Ctrl+Shift+D,4
Processes
Ctrl+Alt+Z
Quick watch
Shift+F9
or
Ctrl+Alt+Q
Re attach to process
Alt+Shift+P
Refresh windowsapp
Ctrl+Shift+R
Registers
Ctrl+Alt+G
Restart
Ctrl+Shift+F5
Run to cursor
Ctrl+F10
Set next statement
Ctrl+Shift+F10
Show call stack on code map
Ctrl+Shift+`
Show next statement
Alt+Num *
Start
F5
Start windows phone application analysis
Alt+F1
Start without debugging
Ctrl+F5
Step into
F11
Step into current process
Ctrl+Alt+F11
Step into specific
Alt+Shift+F11
Step out
Shift+F11
Step out current process
Ctrl+Alt+Shift+F11
Step overPerforms a step-over action.
F10
while debugging
Step overStarts debugging and stops on the first line of user code.
F10
not currently debugging
Step over current process
Ctrl+Alt+F10
Stop debugging
Shift+F5
Stop performance analysis
Alt+Shift+F2
Tasks
Ctrl+Shift+D,K
Threads
Ctrl+Alt+H
Toggle breakpoint
F9
Toggle disassembly
Ctrl+F11
Watch 1
Ctrl+Alt+W,1
Watch 2
Ctrl+Alt+W,2
Watch 3
Ctrl+Alt+W,3
Watch 4
Ctrl+Alt+W,4

Debug context menus

Delete
Alt+F9,D
Go to disassembly
Alt+F9,A
Go to source code
Alt+F9,S

Diagnostics Hub

Stop collection
Ctrl+Alt+F2

Edit

Collapse to definitions
Ctrl+M,Ctrl+O
in the Text Editor
Comment selection
Ctrl+K,Ctrl+C
in the Text Editor
Copy
Ctrl+C
or
Ctrl+Insert
Cut
Ctrl+X
or
Shift+Del
Cycle clipboard ring
Ctrl+Shift+V
or
Ctrl+Shift+Insert
Delete
Del
Duplicate
Ctrl+D
Find
Ctrl+F
Find all references
Shift+F12
Find in files
Ctrl+Shift+F
Find next
F3
Find next selected
Ctrl+F3
Find previous
Shift+F3
Find previous selected
Ctrl+Shift+F3
Format document
Ctrl+K,Ctrl+D
in the Text Editor
Format selection
Ctrl+K,Ctrl+F
in the Text Editor
Generate method
Ctrl+K,Ctrl+M
Go to
Ctrl+G
Go to all
Ctrl+P
or
Ctrl+,
or
Ctrl+T
Go to declaration
Ctrl+F12
Go to definition
F12
Go to member
Ctrl+1,Ctrl+M
or
Ctrl+1,M
or
Alt+\
Go to next locationNext error in the Error List or Output window.
F8
Go to prev locationPrevious error in the Error List or Output window.
Shift+F8
Insert snippet
Ctrl+K,Ctrl+X
Line cut
Ctrl+L
in the Text Editor
List members
Ctrl+J
in the Text Editor
Move control down
Ctrl+Down
Move control down grid
Down
Move control left
Ctrl+Left
Move control left grid
Left
Move control right
Ctrl+Right
Move control right grid
Right
Move control up
Ctrl+Up
Move control up grid
Up
Next bookmark
Ctrl+K,Ctrl+N
Next bookmark in folder
Ctrl+Shift+K,Ctrl+Shift+N
Open fileOpens the file named under the cursor.
Ctrl+Shift+G
Paste
Ctrl+V
or
Shift+Insert
Peek definition
Alt+F12
in the Text Editor
Previous bookmark
Ctrl+K,Ctrl+P
Previous bookmark in folder
Ctrl+Shift+K,Ctrl+Shift+P
Quick find symbol
Alt+Shift+F12
Redo
Ctrl+Y
or
Ctrl+Shift+Z
or
Alt+Shift+Bksp
Refresh remote references
Ctrl+Shift+J
Replace
Ctrl+H
Replace in files
Ctrl+Shift+H
Select all
Ctrl+A
Select next control
Tab
Select previous control
Shift+Tab
Show tile grid
Enter
Size control down
Ctrl+Shift+Down
Size control down grid
Shift+Down
Size control left
Ctrl+Shift+Left
Size control left grid
Shift+Left
Size control right
Ctrl+Shift+Right
Size control right grid
Shift+Right
Size control up
Ctrl+Shift+Up
Size control up grid
Shift+Up
Surround withAvailable only in Visual Studio 2019 and earlier.
Ctrl+K,Ctrl+S
Toggle all outlining
Ctrl+M,Ctrl+L
in the Text Editor
Toggle bookmark
Ctrl+K,Ctrl+K
in the Text Editor
Toggle line commentCtrl+/ requires Visual Studio 2022 version 17.11 or later; Ctrl+K, Ctrl+/ works in earlier versions too.
Ctrl+/
or
Ctrl+K,Ctrl+/
Toggle outlining expansion
Ctrl+M,Ctrl+M
in the Text Editor
Uncomment selection
Ctrl+K,Ctrl+U
in the Text Editor
Undo
Ctrl+Z
or
Alt+Bksp
Word delete to end
Ctrl+Del
in the Text Editor
Word delete to start
Ctrl+Bksp
in the Text Editor

Editor context menus

Breakpoint conditions
Alt+F9,C
Breakpoint edit labels
Alt+F9,L
Insert temporary breakpoint
Alt+Shift+F9,T
Show item
Ctrl+`
Execute
Ctrl+Alt+F5
Go to view
Ctrl+M,Ctrl+G
Toggle header code file
Ctrl+K,Ctrl+O
View call hierarchy
Ctrl+K,Ctrl+T
or
Ctrl+K,T

File

Exit
Alt+F4
New file
Ctrl+N
New project
Ctrl+Shift+N
New web site
Alt+Shift+N
Open file
Ctrl+O
Open project
Ctrl+Shift+O
Open web site
Alt+Shift+O
Print
Ctrl+P
Save all
Ctrl+Shift+S
Save selected items
Ctrl+S
View in browser
Ctrl+Shift+W

Help

Add and remove help content
Ctrl+Alt+F1
F1 help
F1
View help
Ctrl+F1
Window help
Shift+F1

Load test

Jump to counter pane
Ctrl+R,Q

Other context menus

Add new diagram
Insert

Project

Add existing item
Alt+Shift+A
Add new item
Ctrl+Shift+A
Class wizard
Ctrl+Shift+X
Override
Ctrl+Alt+Insert
Preview changes
Alt+;,Alt+C
Publish selected files
Alt+;,Alt+P
Replace selected files from server
Alt+;,Alt+R

Project and Solution context menus

Move down
Alt+Down
Move up
Alt+Up

Refactor

Encapsulate field
Ctrl+R,Ctrl+E
Extract interface
Ctrl+R,Ctrl+I
Extract method
Ctrl+R,Ctrl+M
Remove parameters
Ctrl+R,Ctrl+V
Rename
Ctrl+R,Ctrl+R
Reorder parameters
Ctrl+R,Ctrl+O

Solution Explorer

Open files filter
Ctrl+[,O
or
Ctrl+[,Ctrl+O
Pending changes filter
Ctrl+[,P
or
Ctrl+[,Ctrl+P
Sync with active document
Ctrl+[,S
or
Ctrl+[,Ctrl+S

Team

Go to git branches
Ctrl+0,Ctrl+N
or
Ctrl+0,N
Go to git changes
Ctrl+0,Ctrl+G
or
Ctrl+0,G
Go to git commits
Ctrl+0,Ctrl+O
or
Ctrl+0,O

Team Foundation context menus

Go to builds
Ctrl+0,Ctrl+B
or
Ctrl+0,B
Go to connect
Ctrl+0,Ctrl+C
or
Ctrl+0,C
Go to documents
Ctrl+0,Ctrl+D
or
Ctrl+0,D
Go to home
Ctrl+0,Ctrl+H
or
Ctrl+0,H
Go to my work
Ctrl+0,Ctrl+M
or
Ctrl+0,M
Go to pending changes
Ctrl+0,Ctrl+P
or
Ctrl+0,P
Go to reports
Ctrl+0,Ctrl+R
or
Ctrl+0,R
Go to settings
Ctrl+0,Ctrl+S
or
Ctrl+0,S
Go to web access
Ctrl+0,Ctrl+A
or
Ctrl+0,A
Go to work itemsThe legacy Team Explorer work items experience is deprecated; this now opens work items in the web portal instead of inside Visual Studio.
Ctrl+0,Ctrl+W
or
Ctrl+0,W

Test

Use coded ui test builder
Ctrl+\,Ctrl+C
Use existing action recording
Ctrl+\,Ctrl+A

Test Explorer

Debug all tests
Ctrl+R,Ctrl+A
Debug all tests in context
Ctrl+R,Ctrl+T
Debug last run
Ctrl+R,D
Repeat last run
Ctrl+R,L
Run all tests
Ctrl+R,A
Run all tests in context
Ctrl+R,T
Show test explorer
Ctrl+E,T
Open tab
Ctrl+E,L
Code coverage results
Ctrl+E,C

Tools

Attach to process
Ctrl+Alt+P
Code snippets manager
Ctrl+K,Ctrl+B
Force gc
Ctrl+Alt+Shift+F12,Ctrl+Alt+Shift+F12

View

All windows
Alt+Shift+M
Architecture explorer
Ctrl+\,Ctrl+R
BackwardBehaves differently from Navigate backward when the Text Editor has focus.
Alt+Left
Bookmark window
Ctrl+K,Ctrl+W
Browse next
Ctrl+Shift+1
Browse previous
Ctrl+Shift+2
Call hierarchy
Ctrl+Alt+K
Class view
Ctrl+Shift+C
Class view go to search combo
Ctrl+K,Ctrl+V
Code definition window
Ctrl+\,D
or
Ctrl+\,Ctrl+D
Command window
Ctrl+Alt+A
Data sources
Alt+Shift+D
Document outline
Ctrl+Alt+T
Edit label
F2
Error list
Ctrl+\,E
or
Ctrl+\,Ctrl+E
F# interactive
Ctrl+Alt+F
Find symbol results
Ctrl+Alt+F12
ForwardBehaves differently from Navigate forward when the Text Editor has focus.
Alt+Right
Forward browse context
Ctrl+Shift+7
Full screen
Alt+Shift+Enter
Navigate backward
Ctrl+-
Navigate forward
Ctrl+Shift+-
Next error
Ctrl+Shift+F12
Notifications
Ctrl+W,N
or
Ctrl+W,Ctrl+N
Object browser
Ctrl+Alt+J
Object browser go to search combo
Ctrl+K,Ctrl+R
Output
Ctrl+Alt+O
Pop browse context
Ctrl+Shift+8
C++ projects only
Properties window
F4
Property pages
Shift+F4
Resource view
Ctrl+Shift+E
Server explorer
Ctrl+Alt+S
Show smart tag
Alt+Shift+F10
or
Ctrl+.
Solution explorer
Ctrl+Alt+L
SQL Server object explorer
Ctrl+\,Ctrl+S
Task list
Ctrl+\,T
or
Ctrl+\,Ctrl+T
TFS team explorer
Ctrl+\,Ctrl+M
Toolbox
Ctrl+Alt+X
UML model explorer
Ctrl+\,Ctrl+U
View code
F7
View designer
Shift+F7
Web browser
Ctrl+Alt+R
Zoom in
Ctrl+Shift+.
Zoom out
Ctrl+Shift+,
Show Test Explorer
Ctrl+E,T

Window

Activate document window
Esc
Add tab to selection
Ctrl+Alt+Shift+Space
Close document window
Ctrl+W
or
Ctrl+F4
Close tool window
Shift+Esc
Keep tab open
Ctrl+Alt+Home
Move to navigation bar
Ctrl+F2
Next document window
Ctrl+F6
Next document window nav
Ctrl+Tab
Next pane
Alt+F6
Next split pane
F6
Next tab
Ctrl+Alt+Pg Dn
or
Ctrl+Pg Dn
Next tab and add to selection
Ctrl+Alt+Shift+Pg Dn
Next tool window nav
Alt+F7
Previous document window
Ctrl+Shift+F6
Previous document window nav
Ctrl+Shift+Tab
Previous pane
Alt+Shift+F6
Previous split pane
Shift+F6
Previous tab
Ctrl+Alt+Pg Up
or
Ctrl+Pg Up
Previous tab and add to selection
Ctrl+Alt+Shift+Pg Up
Previous tool window nav
Alt+Shift+F7
Quick launch
Ctrl+Q
Quick launch previous category
Ctrl+Shift+Q
Show dock menu
Alt+-
Show Ex MDI file list
Ctrl+Alt+Down

Intro

Visual Studio on Windows leans on two-step chords more than most IDEs: Ctrl+K starts editing commands, Ctrl+R starts refactoring commands, and the second keypress picks the specific action.

Windows-specific shortcut notes

Ctrl+K is the editing prefix. Comment (Ctrl+K, Ctrl+C), uncomment (Ctrl+K, Ctrl+U), format document (Ctrl+K, Ctrl+D), and toggle bookmark (Ctrl+K, Ctrl+K) all share it.

Ctrl+R is the refactoring and testing prefix. Rename (Ctrl+R, Ctrl+R) and Extract Method (Ctrl+R, Ctrl+M) live here, alongside Test Explorer's Run All Tests (Ctrl+R, A).

F-keys drive debugging. F5 starts, F9 toggles a breakpoint, F10 steps over, F11 steps into, matching the row most Windows IDEs use for the same actions.

Ctrl+, opens Go To Anything. Also bound to Ctrl+P and Ctrl+T, it searches files, types, and members from one box.

Printable PDF

The Visual Studio Windows shortcut list is available as a printable PDF. The Ctrl+K editing chords and Ctrl+R refactoring chords are worth learning first.

FAQ

Need more than shortcuts?
Visit the Visual Studio app page for an overview and helpful links.

Want to suggest a new app, report a bug, or get help? Email us at info@hkeys.app.

For anything else or just a quick hello, write to us at info@hkeys.app.