Fortunately, Visual Studio has many simple features to speed up and simplify code navigation. The search list persists in the find results window allowing you to examine other results whenever you need to.Īs a project grows, navigating around code within many many files can start to become time-consuming. Once you’ve found the right result, click on it to navigate to the code. By clicking Find All, you’ll get a list of all search results ordered by file, allowing you to scan through them however you like. The Ctrl+Shift+F shortcut will open a different dialog with more search options, the main one I use of which is to specify what types of files to search through. Find all is where it’s at, which you can initiate using the Ctrl+Shift+F keyboard shortcut. Once you lose focus from the search dialog, you need to loop through all the search results again, rather than continuing from where you were. Instead of manually stepping through a breakpoint many times this is a great way to avoid coding errors.Ĭtrl+F is great but only gives you the option to step through each search result one at a time. The text box for entering a condition even has IntelliSense to help avoid coding typos. With the popup, you can check for all sorts of conditions such as if a particular value equals an expected value, or if it has hit a breakpoint. Right-click a breakpoint and select “Condition” or use the Alt+F9 keyboard shortcut. If a line of code is hit many times, such as within a loop, while you’re trying to debug, getting to the breakpoint while the application is in the state that you want to investigate can be a time sink.Ĭonditional breakpoints help save time here. A breakpoint can be added by either clicking the gray margin to the left of the line of code or by pressing F9 while the caret is on the line of code. You can also view the application state to check that everything is fine or to debug why something is not working as expected. Make sure to rename files first if you intend to rename the class to save a bit of time.Ī breakpoint is a flag that you can set on a line of code that will cause the Visual Studio debugger to pause code execution when the running process reaches that line of code. Renaming a file in the solution explorer will often cause Visual Studio to ask you if you want to perform a rename in the class within that file. You will lose the option to rename if you make any other changes to the file while the dotted line surrounds the name.
Hit Return to apply the rename which will update all the references to that member too – saving a lot of otherwise manual work. and Visual Studio will ask if you want to rename that member. While the caret is still within the name, you can press Ctrl+. By replacing the name of a class, interface, method, namespace, property, variable, constant, delegate, event and so on, the name will be surrounded by a dotted line. Renaming, on the other hand, is super easy in Visual Studio. Sometimes naming something is always hard.
Naming can be hard to get right the first time. Use the Ctrl+Space keyboard shortcut to manage this. Or sometimes you may want to open it without having typed anything yet. The IntelliSense popup automatically opens as you type, but sometimes you may lose it – say if you are navigating away and back. The popup allows you to hit the Return key generally after typing a few characters to complete the method name and swiftly start typing the parameters. (And any available extension methods), filtered by what you’ve typed so far. If you’re calling a method, for example, you’ll see a popup containing only method names accessible on the class you’re calling on. IntelliSense is Visual Studio’s way of auto-completing names based on what you type and what’s available in the current context. Let’s start off with a simple one – opening the IntelliSense popup. If you’ve been coding in Visual Studio for years, this list may serve as a refresher, or you may even learn something new.
If you’re new to using Visual Studio, I recommend giving these a go and then get into the rhythm of using them often. Here is a list of the top 11 Visual Studio features that I use just about every day (yes, including the weekend). Shortcut key of break command in autocad.10 Visual Studio features to turbocharge your coding By Jason | Posted | 7 min.