Visual Studio Productivity Hacks

Unlock your coding potential with these essential shortcuts.

Navigation & Search

Go to Definition

Instantly jump to the source code definition of a symbol.

F12 Ctrl + F12 Ctrl + Click

Find All References

Locate every place a variable, method, or class is used.

Shift + F12

Go to Member

Quickly search for members (methods, properties, fields) by name.

Ctrl + Q

Go to File

Search for and open any file in your solution.

Ctrl + T

Find in Files

Search for text across all files in your solution or directory.

Ctrl + Shift + F

Editing & Refactoring

Code Snippets

Insert pre-defined code templates like loops, classes, and more.

Tab, Tab (after typing snippet name like 'for')

Rename Symbol

Safely rename variables, methods, classes, etc., across your project.

F2

Comment/Uncomment Line

Quickly add or remove single-line comments.

Ctrl + K, Ctrl + C

Uncomment Line

Remove single-line comments.

Ctrl + K, Ctrl + U

Format Document

Apply consistent code formatting to the entire document.

Ctrl + K, Ctrl + D

Smart Indent

Re-indent the current line or selection based on code context.

Ctrl + K, Ctrl + I

Debugging

Start Debugging

Begin debugging your application.

F5

Step Over

Execute the current line and move to the next.

F10

Step Into

Enter the current line (if it's a function call).

F11

Step Out

Continue execution until the current function returns.

Shift + F11

Add/Remove Breakpoint

Toggle a breakpoint on the current line.

F9

Run to Cursor

Execute code until the cursor position.

Ctrl + F10