As a developer, we use IDE almost the whole day and write code. We write several codes and complete the requirements of the application or small module of it. Besides coding, we do several other activities which are also part of development. Apart from writing code, we spend time with building code, debugging, editing, formatting, refactoring, adding files, folders, projects etc. These activities associated with writing code are also time consuming and some take huge time which ultimately affect productivity of Developers.

If a developer saves a small fraction of time in each of these activities, then it can improve productivity significantly. Using shortcut keys and commands can help to save time and result in considerable improvement as well as productivity.

In this article, I will share the most useful and trendy shortcut keys for visual studio which apply globally if it is not specified or altered. These shortcut keys are available for general or every profile for visual studio installed.

We can categorize these shortcut keys based on activities like build, debug, Code Editor, File, Project, refactor, tools and so on.

This article will discuss the shortcut keys to Visual Studio on Windows.

Debugging

One of the most common and time-consuming activities during coding and development is debugging. Using below shortcut keys can improve productivity and save huge time for developers.

Action/Task/CommandShortcut Keys
Start DebuggingF5
Stop DebuggingShift + F5
Restart DebuggingCtrl + Shift + F5
Start without DebuggingCtrl + F5
Break at FunctionCtrl + B
Break AllCtrl + Alt + B
Toggle BreakpointF9
Run to CursorCtrl + F10
Disable BreakpointCtrl + F9
Delete All Break PointsCtrl + Shift + F9
Step Over (during Debug)F10
Step IntoF11
Step OutShift + F11
Run to CursorCtrl + F10
Quick watchCtrl + Alt + Q or Shift + F9
ExceptionsCtrl + Alt + E
Attach to processCtrl + Alt + P
Immediate windowCtrl + Alt + I
Immediate window command modeType >
Immediate window – clear bufferType cls
Immediate window – print valueType ? varname

Building

The below are the popular building shortcut keys.

Action/Task/CommandShortcut Keys
Build SolutionCtrl + Shift + B
CancelCtrl + Break
CompileCtrl + F7
Run Code analysis on SolutionAlt + F11

Code Editor

This is another area where developers or programmers spend most of their time writing code. And using shortcut keys can improve productivity and speed up the writing code. Some of the most common shortcut keys are listed below.

Action/Task/CommandShortcut Keys
Go To AllCtrl + T
Go To Recent FilesCtrl + T, R
Search/FindCtrl + F
Find in FilesCtrl + Shift + F
Find NextF3
Find Next SelectedCtrl + F3
Format DocumentCtrl + K, Ctrl + D
Format SelectionCtrl + K, Ctrl + F
IntelliSence Suggestion ModeCtrl + Alt + Space (toggle)
Go to Line NumberCtrl + G
Go To DefinitionF12
Go To DeclarationCtrl + F12
Peek DefinitionAlt + F12
Copy LineCtrl + D
Insert snippet (insert code)Ctrl + K, Ctrl + X
Close Peek Definition WindowEsc
UndoCtrl + Z
RedoCtrl + Y
Select Current WordCtrl + W
Cancel SelectionEsc
Delete word from Current curser to EndCtrl + Delete
Delete word from Current curser to StartCtrl + Backspace
List MembersCtrl + J
Save fileCtrl + S
Save All FilesCtrl + Shift + S
Toggle All OutlineCtrl + M, Ctrl + L
Toggle Outlining ExpansionCtrl + M, Ctrl + M
Comment SelectionCtrl + M, Ctrl + C
Uncomment SelectionCtrl + K, Ctrl + U
Quick ReplaceCtrl + H
Refactoring Shortcut Keys
Extract MethodCtrl + R, Ctrl + M

File

Some popular shortcut keys for file actions are given below:

Action/Task/CommandShortcut Keys
New FileCtrl + N
Open FileCtrl + O
New ProjectCtrl + Shift + N
Open ProjectCtrl + Shift + O
RenameF2
View in BrowserCtrl + Shift + W
Save fileCtrl + S
Save All FilesCtrl + Shift + S
View in BrowserCtrl + Shift + W
Project Related Shortcut Keys
Adding existing itemShift + Alt + A
Adding New ItemCtrl + Shift + A
 

View

Some popular keys related to viewing are listed below.

Action/Task/CommandShortcut Keys
Class viewCtrl + Shift + C
Error ListCtrl + \, E
Navigate backwardCtrl + –
Navigate forwardCtrl + Shift + –
Object BrowserCtrl + Alt + J
Properties windowF4
Server ExplorerCtrl + Shift + S
Solution ExplorerCtrl + Alt + L
Output windowCtrl + Alt + O
TFS ExplorerCtrl + \, Ctrl + M
ToolboxCtrl + Alt + X

Above are the most popular and useful shortcut keys that can boost the productivity of developer or programmer significantly in visual studio.

Conclusion

In this article, I have shared some of the most popular and useful visual studio shortcut keys. Using shortcut keys save huge time while writing code and boost productivity in overall. Additionally, I have shared those shortcut keys based on categories which are mostly used in debugging and building, code editor, file and viewing.

Reference: Microsoft

Visual Studio

By Rijwan Ansari

MVP, CSM, CSPO, MCP, MCTS. Sr. Software Developer. Expertise in ASP.NET MVC, Angular, AngularJs, .Net Core, C#.NET, Azure, Cognitive Services, Machine Learning, SharePoint, Azure Services, and tools, Requirement Analysis, Team Management, Pre-Sales and more. Ability to work independently and Team, handle pressure and meet commitment. Excellence Communication and adjust in any environment

Leave a Reply

Your email address will not be published. Required fields are marked *