The whole idea of taking advantage of these Visual Studio hotkeys is to increase productivity and save time. With these TOP-50 Visual Studio keyboard shortcuts, developers have easy ways to get more done without lifting a finger off the keyboard. these hotkeys work for Visual Studio 2015 to the latest Visual studio 2019.
CTRL+Q opens the quick launch so you can search an indexed list of every feature available in Visual Studio. For example, If you want to do add a new item, use the quick launch with that as your search term and receive guidance on how to do that.
In Visual Studio, users can apply Quick Launch to instantly explore and complete activities for IDE as elements like templates, options, and menus. One thing to remember is that users can’t apply Quick Launch to explore for code and figures.
With a lot of nested statements, it can be tough to keep track of opening and closing braces which, if missing, can cause compiler errors. Use CTRL+ ] to find the matching closing brace of a function or class and reduce the chance of falling prey to annoying error messages.
Sometimes making code work comes at the expense of making it look good. Proper indentation and spacing make code readable and that’s how CTRL+K+F works. Just highlight the section you need to format and it cleans up sloppy coding like magic.
For loops and if-then conditions have a standard structure that’s tedious to type over and over. To automate that process, you just need to type the beginning of your condition. For example, type ‘Try,’ hit the TAB key twice, and you get access to the snippets that complete the condition for you down to the braces. All you have to do is modify the parameters and you’re good to go.
This shortcut combines three debugging Visual Studio code commands in one. CTRL+SHIFT+F5 lets you end the debugging session, rebuild it, and create a new debugging session.
Manually adding and removing ‘//’ is tedious especially, if you have a long piece of code you want to deactivate. CTRL+K+C is a quicker way to bulk comment. Just highlight the block and type the Visual Studio shortcuts. When you need to make those lines active again, highlight the block and use CTRL+K+U to uncomment.
You can also use Ctrl+Shift+/ for toggling. The toggling can be used for block comments because Ctrl+/ is a shortcut for toggling line comments and block comments. To execute this, click on the settings and then click ‘Keyboard Shortcuts’. Here you will see a “toggle block.” Now, click and enter your combination.
Having multiple screens open helps you multitask. But if you want to focus on one section, going full screen used to mean losing important panels like the menu bar. ALT+SHIFT+ENTER lets you go full screen, but you retain access to your menu and panels. Another benefit is that you gain access to another four to 10 extra lines of code, depending on your screen resolution.
You’ve got your TRY-CATCH or IF loop structure but still need some code to put inside. Use Ctrl+K+S to open up a contextual menu from which you can choose the snippets you need to populate your condition.
Bookmarks help you keep track of the special markers in your code. For example, if there’s a function that you’re constantly referring to, CTRL+K+K marks that line with a little dot at the left. Additionally, use CTRL+K+N to cycle to the next bookmark in the list and CTRL+K+P for previous bookmarks. Just remember that the bookmark tags the line of the code, not the code itself.
The Clipboard Ring is a Visual Studio feature that allows copying multiple code blocks and pasting them. Users can copy various lines of code and put them on the clipboard. These lines of code can then be pasted when required. This improves development productivity. The copied code is stored in a memory, and users can use them in IDE.
CTRL+C allows you to keep the last 15 copied pieces of content in the clipboard. CTRL+SHIFT+V gives you access to this clipboard ring where you can scroll through the list of copied lines until you find the one you want to paste.
If your code file is too long and you want to make it more manageable, consider minimizing it with CTRL+M+M Visual Studio code shortcut keys. Just select the whole file and use this hotkey to collapse all functions to the most basic view. You can re-expand a specific section to see what you want. You can also use CTRL+M+O to collapse to the definition level, which may be a more useful view.
You have a code block and want to edit an event so that it’s reflected throughout the other lines in the block. Instead of changing each line individually, hold ALT then click and drag to highlight that block. Type the change you want and you’ll see all selected lines change at once.
In Microsoft, visual studio users can choose a block of text by pressing down the Alt key when choosing code and text with the mouse. This is particularly helpful for selecting a string of data or code as opposed to the whole line.
These Microsoft Visual Studio shortcuts are faster alternatives to copy-move-paste. To change the location of a certain block of code, highlight the lines then click ALT+↑(up arrow) to move all lines up at once or ALT+↓ (down arrow) to move all likes down.
In Visual Studio, users can use the Find All References to see where the required code details have referenced the codebase thoroughly. The Find All References is accessible on the context list or just press Shift + F12.
To see the instance of a class, hover over the name and hit F12. To see everywhere you’ve used that class, use SHIFT+F12.
These VS code hotkeys are absolutely necessary. Image, you’ve been scrolling down many lines of code and want to go back to some reference that’s 100 lines away. Instead of scrolling up or down to find that place, use CTRL+-(minus) to step backward through the navigation history, which shows everywhere, you’ve clicked and in the order, you clicked them. To go forward, use CTRL+SHIFT+-.
Check all Visual Studio hotkeys in this video tutorial:
The built-in Microsoft visual studio means compile and connect only the root files that have been modified since the previous build. The Rebuild feature in Microsoft Visual studio means compile and connect all root files despite whether they changed or not.
CTRL+SHIFT+B is a quicker way to build a solution.
Use these Visual Studio keyboard shortcuts if you want to create a new task, for example. Type the word ‘task’ and use CTRL+. (dot) to see a menu. Press enter and you’ll see the namespace appear. Autocomplete helps with any coding issues, such as maintaining naming conventions.
You do a build and find that you didn’t name a property properly. Instead of hunting for every reference, click on the variable and use CTRL+R+R. This hotkey will not only rename the property but also change the name wherever it’s referenced. When you click Apply, you’ll see all the references it will rename.
These Visual Studio hotkeys can be useful when you’re debugging. If you want to step into a function as far as it can go and not just move to the next line, press F11 to jump into the constructor.
Always remember that it doesn’t work if you are debugging a static constructor. If not, then it works as usual. For this, the constructor is only called once. So, before the class is accessed for the first time always make sure that the debugger is attached to it.
When you see the light bulb, it means there’s an easier action to take. You can take advantage of the hotkey shortcuts. For example, if you have unused USING statements or if you want to add a clause, ALT+ ENTER will get rid of unnecessary statements as well as add that recommended snippet to your clause.
Visual Studio contains a characteristic that enables users to add a bookmark. This bookmark can be added to a line of code in a solution. As with a regular bookmark that instantly enables users to go back to the last place, the Visual Studio allows users to immediately find a labeled line in the code. Users can generate many bookmarks and they can instantly navigate between them. Now, to remove this bookmark we have a shortcut key Ctrl+K.
These Visual Studio code hotkeys are useful for removing the syntax of the comment from the prevailing line or currently marked lines of code. For example, if you are using the code editor and you want to remove the already written syntax of comments then Ctrl-K comes under the text manipulation Visual Studio keyboard shortcuts.
This key is part of project-related shortcuts. For example, you are using Microsoft Visual Studio and you have developed a new project called “MyProject”. Now, if you want to open this project in the code editor then Ctrl+Shift+O can be used. The project Visual Studio code shortcut keys are very useful if you are working on a big project and repositories.
This shortcut key is also part of project-related Visual Studio shortcut keys. For example, if you want to override base class methods. Now, you want to achieve this in an already derived class when an overridable method is called. To execute this in the Class View pane you can use the Ctrl+Alt+Insert key.
This shortcut key is the part of Search and replaces related Visual Studio hotkeys. This hotkey starts an incremental search. After pressing Ctrl+I, the user can insert the text. Once the text has been entered, this key will help in finding the text and the related pattern. The search and replace Visual Studio keyboard shortcuts are useful in finding various codes and comments from the code editor.
This shortcut key is also part of Search and replaces related Visual Studio code shortcuts. This key is used for selecting or clearing the Regular Expression option. With the help of Alt+F3, R the special characters can be used in the Find and Replace methods.
This key is part of Debugging related Visual Studio commands. This shortcut key displays the Memory 1 window to observe memory in the method being debugged. This is especially beneficial when you do not have debugging figures ready for the code. It is also important for studying at large buffers.
This key is part of Object browser-related Microsoft Visual Studio shortcuts. This displays the Object Browser to inspect the classes, attributes, processes, events, and constants specified either in the project or by elements and sample libraries referenced by the project.
In the visual studio, the Tool window is a child window of the integrated development environment. The IDE is used to display various information. Each view includes two tool window collections. These are known as primary, the secondary. In this, only one tool window from each collection or group can be active.
This shortcut key is part of Tool window-related commands. This switches the window inside or out of a method enabling text inside the window to be chosen.
This key is part of Windows manipulation-related Visual Studio code shortcut keys. It allows moving to the next tab in the document or window. For example, if you can switch the HTML editor from its design view to HTML view.
Visual Studio enables users to create cursors. In Visual Studio, users can create a cursor file. This File is a bitmap file. cur extension. For creating this file, just right-click on the selected project and select Add New Item. Now, select Cursor File and this will create a .cur file.
This shortcut key is part of General Visual Studio code commands. This key moves the cursor to the preceding item, for instance in the TaskList window or Find Results window.
This hotkey displays the Solution Explorer. The solution explorer is responsible for listing the projects and files in the current solution of the project. The solution explorer is a window that allows users to explore and maintain all projects.
Solution Explorer shows the projects that comprise your solution, the files and folders in each project as they appear on the physical hard disc, and any assemblies, COM objects, or files that the project refers to. The context menus in Solution Explorer offer a variety of commands to assist you in managing your projects.
To open the window without a hotkey, select View > Solution Explorer
This hotkey displays the Toolbox. The toolbox is an important component of VS. It includes controls and other objects that can be moved into editor Windows and designer windows. Many controls can be easily added to the projects with the help of a toolbox.
Toolbox is displayed alongside designer views, such as the designer view of a XAML file or a Windows Forms App project. The Toolbox only shows controls that can be utilized by the current designer. Toolbox is collapsed along the left side of the Visual Studio IDE by default, and only appears when the cursor is moved over it. A toolbox can be pinned (by clicking the Pin symbol on its toolbar) so that it remains open when the pointer moves. You can also unhide the Toolbox window and move it about your screen.
To open the window without a hotkey, select View > Toolbox
This hotkey displays the property pages for the objects and controls currently selected. For instance, one can use Shift+F4 to display a project’s settings and many other such properties. Users can modify and see the configuration by using this hotkey.
This hotkey is used to display the web browser window in the Visual Studio. The Ctrl+Alt+R enables users to view or monitor various web pages on the Internet.
Web browser window for VS Code allows you to open a genuine browser preview within your editor and troubleshoot it. Browser Preview is powered by headless Chromium and operates by launching a new process with a headless Chromium instance. This can either be Google Chrome or Microsoft Edge. This allows for a secure means to render web information within VS Code, as well as fascinating features like in-editor debugging and more!
This hotkey is used to display the Macro Explorer window. It lists all available macros. Macros allow users to automate repetitive tasks in the IDE. The Alt+F8 is one of the important hotkeys in Visual Studio.
Macro Explorer window is the extension for the visual studio that can record most of the commands in Visual Studio, including text editing operations. When a specific operation or task needs to be repeated several times, Visual Studio Macros are one technique to boost productivity. Except for thinking, macros can perform almost anything that can be done manually in the Visual Studio Integrated Development Environment (IDE).
To open the window without a hotkey, select View->Other Windows->Macro Explorer.
The Ctrl+Shift+G is used to define the elements to be adjusted by utilizing a hidden grid. The grid spacing can be configured on the Design pane of HTML designer and the grid will automatically adjust itself the next time users open a document.
This Visual Studio hotkey is used to display the bookmark dialogue. Users can use bookmarks to identify or point to particular code lines to comment on important messages or to quickly return to a particular location. The Ctrl+K shortcut is used to add a bookmark.
Note: The bookmark is set to the line number rather than the code. The bookmark remains at the line number and does not move with the code when you change the code. The Bookmark Window (View > Bookmark Window) and the text editor toolbar both provide bookmark commands and icons.
The Ctrl+F9 enables or disables the breakpoint. It is used to define the breakpoint on the current line of code. It is one of the handy hotkeys of Visual Studio.
Breakpoints are one of the most significant debugging tools in a developer’s toolbox. Breakpoints are placed wherever you want to suspend debugger execution. Click in the far left margin next to a line of code to set a breakpoint in the source code.
Alternatively, you can pick the line and press F9, choose Debug > Toggle Breakpoint, or right-click and choose Breakpoint> Insert Breakpoint. A red dot indicates the Breakpoint in the left margin.
The F5 hotkey is used to debug the application. It is used to run the application in the debugger mode and it displays what the code is doing when it runs. On the other hand, the ctrl + F5 hotkey is used to execute the application without the debugger.
A debug menu, sometimes known as a debug mode, is a user interface built in a computer program that allows the user to examine and/or alter the program’s internal state for debugging purposes.
This Visual Studio shortcut comes under window management hotkeys. It is used to open the immediate window. The immediate window enables communication with parameters and variables when the written program is in debug mode. It allows the modification and inspection of the variables or parameters of the written code.
This hotkey is widely used by developers for checking things. This hotkey allows developers to navigate to the subsequent description, information, or reference of an object. It is accessible in the object browser and Class View window. It is also accessible in source editing windows with the Shift+F12 shortcut.
It is one of the most widely used hotkeys. This hotkey is also used to invoke the View.BrowseNext. It comes under the View section of Visual Studio hotkeys. The hotkey Ctrl+Shift+2 is used to invoke the View.BrowsePrevious. In short, it comes under the View class and is also called a navigation shortcut.
This hotkey is used to invoke the CrossAppDomainDelegate. It is used to executes the code in a different application domain that is recognized by the named delegate. It is used in the system namespace and it is a part of mscorlib.dll assembly. This hotkey is also used to invoke the AppDomain.DoCallBack(CrossAppDomainDelegate) method. Every application domain has an app domain variable.
In this, a constructor is launched when an attachment is packed into an application domain, and the destructor is launched when the application domain is relieved. The app domain variable describes an application domain, which is a private setting where applications perform. This class cannot be derived.
The hotkey “S” is used to invoke Stackalloc. It is used to allocate a block of memory on the stack. A block built through the method execution is implicitly abandoned when that method echoes. Users cannot explicitly release the memory designated with stackalloc. A stack-allocated memory block is not related to garbage collection and doesn’t have to be bound with a fixed statement.
The method of stackalloc implicitly allows buffer overrun discovery characteristics in the typical (common) language runtime (CLR). If a buffer overrun is identified, the method is stopped as promptly as possible to reduce the risk that malicious code is performed.
The A+B hotkey is used to invoke the AccessViolationException. An access violation happens in unmanaged or insecure code when the code tries to write to memory that has not been designated, or to which it does not have a path.
This normally happens because a pointer has the wrong value. Not all write within wrong pointers point to access infractions, so an access violation normally means that some read or writes have transpired into bad pointers, and that memory might be damaged. Thus, access violations almost invariably mean severe coding errors. An AccessViolationException explicitly recognizes these grave errors.
This hotkey is used to invoke the Console.WriteLine Method. It is used to write the defined data, supported by the prevailing line terminator, to the regular output stream. It can be used with various parameters. It is also used to write the text description of the defined objects, supported by the prevailing line terminator, to the regular output utilizing the designated format data.
The default line terminator is a line whose purpose is a position return accompanied by a line feed. You can adjust the line terminator by placing the TextWriter.NewLine section of the Out section to a different string.
The F10 key is one of the most widely used keys. F10 is also called a step-over. The interesting thing about this key is that it does not fall greatly into the call stack. It proceeds to the subsequent line of the existing function. The F10 key can be utilized for two goals, first and the most popular application is to step over a line. The second application of the F10 key is to begin the debugging event and splits at the first line of code where the application begins.
This hotkey is one of the coolest keys. This key is used to reopen the closed editor. It is also used to restore editor sessions. A code editor reconfigured for creating and debugging web applications. The interesting thing about this shortcut is that it is also used in the Chrome browser to restore accidentally closed tabs. The entire purpose of taking benefit of this Visual Studio hotkey is to improve the richness and save time.
This key is widely used in Visual Studio while working on the project. It is used to show the active file in a new window/instance. While running on huge codebases, the VS Solution Explorer can be synchronized with the active file too. The important point here to remember is that it makes moving to other similar files, joining new classes in the same position, renaming files, etc more rapid. The environment to hold the objects in sync is configurable in the Visual Studio editor and is turned off by default. Visual Studio also has some amazing code snippets that users can utilize to instantly and quickly create regularly applied code blocks. Code snippets are possible for various programming languages such as C#, Visual Basic, and C++.
This hotkey is one of the most important hotkeys in the Visual Studio code editor window or instance. This hotkey is used to show the information, meaning, and description of the chosen symbol. The single use of the F12 key is to open the File extension as a Definition Provider. It indicates that it only responds to ‘Go to Definition’. This key is one of the widely used keys with other significant options. Visual Studio also has a set of tools to build Microsoft Azure applications. Users can set, develop, debug, and extend Azure apps and settings quickly from the integrated development environment (IDE). To obtain the Azure tools and project templates, users can select the Azure development workload after installing Visual Studio.
This key is mostly used to create a new terminal in the visual studio. Visual Studio Code incorporates a fully-featured open terminal that begins at the heart of the workspace. It gives a union with the editor to assist innovations like links and error disclosure. To start the terminal, users can use the Ctrl+Shift+` keyboard shortcut with the backtick as mentioned here. The important thing to notice here is that if users want to continue without a code option then just open the IDE without any particular project or code stored. Users might pick this alternative to enter a Live Share session or add to a method for debugging. They can also push Esc to stop the start window and begin the IDE.