Visual Studio Keyboard Shortcuts

A deep Visual Studio shortcuts guide for navigation, editing, refactor, debugging, and testing.

Visual Studio Keyboard Shortcuts banner

Search & Navigation

Key / CodeDescription
Ctrl + QQuick Search
Ctrl + TGo to All
Ctrl + ,Go to Symbol
Ctrl + -Navigate backward
Ctrl + Shift + -Navigate forward
Ctrl + TabNext document

Editing

Key / CodeDescription
Ctrl + K, Ctrl + CComment selection
Ctrl + K, Ctrl + UUncomment selection
Ctrl + DDuplicate line
Alt + Up/DownMove line
Ctrl + LDelete line
Ctrl + Shift + VCycle clipboard ring

Refactor

Key / CodeDescription
Ctrl + R, Ctrl + RRename
Ctrl + R, Ctrl + VExtract method
Ctrl + R, Ctrl + IInline
Ctrl + .Quick Actions

Find & Replace

Key / CodeDescription
Ctrl + FFind
Ctrl + HReplace
Ctrl + Shift + FFind in Files
Ctrl + Shift + HReplace in Files
F12Go to definition

Debugging

Key / CodeDescription
F5Start debugging
Shift + F5Stop debugging
F9Toggle breakpoint
F10Step over
F11Step into
Shift + F11Step out

Testing

Key / CodeDescription
Ctrl + R, TRun all tests
Ctrl + R, Ctrl + TRun tests in context
Ctrl + R, LRun last test

Pro Workflow

Common flow: search → quick action → rename → debug → test.

Ctrl + Q  # quick search
Ctrl + .  # quick actions
Ctrl + R, Ctrl + R  # rename
F5  # debug
Ctrl + R, T  # test

When These Shortcuts Matter

This page helps when you are trying to stay in flow during a .NET or C# coding session. The highest-value shortcuts are usually the ones for symbol search, rename, quick actions, breakpoint control, and test execution because they remove the constant mouse travel between editing, debugging, and verification.

Common Shortcut Pitfalls

Visual Studio keymaps can differ if extensions or alternate schemes are enabled, so confirm your active profile before memorizing everything. New users also tend to learn too many commands at once; it is more effective to master a small navigation and debugging set first, then add refactor and test shortcuts gradually.

Related

Knowledge is power.