Develop in Visual Studio2025-02-06T09:35:09-08:00

Develop

Code more productively with tools and extensions in the latest Visual Studio

Code like Scott

Scott shows you his coding set-up, including Live Unit Testing, customizing his cursor, and Diagnostic Tools. He also shows how Cloud Explorer works with the Azure Portal.

Save time debugging

Leslie shows how you can save time debugging with the new Search feature for the autos, locals, and watch windows in Visual Studio 2022.

Saved Window layouts

We’re introducing ways that make Visual Studio more flexible so you can learn, navigate, and write code the way you want to. We’ve introduced new custom themes and flexible document management capabilities, like color tabs.

Default keyboard shortcuts

Configure keyboard shortcuts: Tools >Options>Environment>Keyboard

Visual Studio SearchCtrl+Q
Go to AllCtrl+T or Ctrl+,
Go to Type / File / Member / SymbolCtrl+1+T/F/M/S
Navigate Backward / ForwardCtrl+-/Ctrl+Shift+-
Go to definition / Peek to definitionF12/Alt+F12
Go to ImplementationCtrl+F12
Go to Next ErrorCtrl+Shift+F12
Go to Next / Previous Result in ListF8/Shift+F8
Quick Actions / Refactoring SuggestionsAlt + or Ctrl+.
Method infoCtrl+K,Ctrl+I
Comment / UncommentCtrl+K,Ctrl+C/Ctrl+K,Ctrl+U
Delete line (without copying)Ctrl+Shift+L
Paste from clipboard buffer ringCtrl+Shift+V
Move code Up / DownAlt+/
Format Document / SelectionCtrl+K,Ctrl+D/Ctrl+K,Ctrl+F
Surround with (…if/try/for each)Ctrl+K,Ctrl+S
RenameCtrl+R,Ctrl+R
Encapsulate fieldCtrl+R,Ctrl+E
Remove and sort usingsCtrl+R,Ctrl+G
Extract MethodCtrl+R,Ctrl+M
Previous/Next Subword Ctrl+Alt+/
Add caret to next/all matchShift+Alt+./;
Debug / Run / StopF5/Ctrl+5/+Shift+5
Toggle breakpointF9
Step overF10
Step intoF11
Step outShift+F11
Debug all tests / Run all testsCtrl+R,Ctrl+A/Ctrl+R,A
Restart Debugging Ctrl+Shift+F5
Clears all of the breakpoints in the project Ctrl+Shift+F9
Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to workCtrl+F9
Opens the New Breakpoint dialog Ctrl+B
Displays the Breakpoints window Ctrl+Alt+B
Sets temporary breakpoint F9+Shift+Alt,T
Displays the processes dialog. Ctrl+Alt+P
Run to Cursor Ctrl+F10
Set Next Statement Ctrl+Shift+F10
Open Solution ExplorerCtrl+Alt+L
Open Output windowCtrl+Alt+O
Open Error listCtrl+,E
Open Team ExplorerCtrl+,Ctrl+M
Open BreakpointsCtrl+Alt+B
Next / Previous tool windowAlt+F6/Shift+Alt+F6
Close current tool windowShift+esc
Go to document to the left / rightCtrl+Alt+pgUp+PgDn
Open document: Most recent / Least recentCtrl+tab/Ctrl+Shift+tab
Keep preview window openCtrl+Alt+
Full screen (max window size / reduced menus)Shift+Alt+

Tips and tricks

Use Light Bulbs to access built-in code analyzers that can detect issues in your code and provide a range of solutions or refactoring options to address them.

screenshot of light bulbs

Customize Visual Studio’s scroll bar with Map Mode to display a miniature overview of your files alongside the scroll bar, and easily navigate long files.

screenshot of map code

Leverage the Go To commands to efficiently search your code and swiftly navigate to specific lines, types, symbols, files, and more, all from a unified interface.

screenshot of edit/go to recent file

Utilize Code Maps to visualize and quickly review the structure, dependencies, organization, and relationships between your code files without having to read through each file individually.

screenshot of code map

Make use of the Error List to filter errors, warnings, and messages, and to search and quickly navigate to the specific line containing an error.

Screenshot of error list

Take it further with extensions

Extensions are add-ons that customize and enhance Visual Studio, including extra settings, features, or uses for existing tools. With thousands of extensions on the marketplace, you’ve got options galore to increase your productivity and cater to your workflow.

GitHub actions icon
GitHub Actions
Installs
Markdown Editor icon
Markdown Editor v2
Installs
Visual Studio Theme Pack screenshot
Visual Studio Theme Pack icon
Visual Studio Theme Pack
Installs
SQLite SQL Server icon
SQLite and SQL Server Compact Toolbox
Installs

Feedback