Visual Studio 2019 – Why You Should Have Upgraded Yesterday

 

Out With The Old In With The New

If you are a developer, you use an IDE (Integrated Development Environment for those not in the know) or Text Editor, not only that but you probably also have a favorite that you use regularly. I have used several;  Atom, Sublime, Eclipse, XCode, VS Code, and Visual Studio.

In terms of an actual IDE, you can’t get much better than Visual Studio. The debugging, compiling, range of tools and languages supported are numerous, and the number of extensions are continually growing. It can be a beast in terms of resources but is worth it. For our projects here at Advisicon, there is no better tool to get the job done.

Microsoft has recently released the 2019 version of Visual Studio, (check it out on MSFT), with some quality of life updates that are totally worth the update. I’ve been using 2019 for about seven months, and about five of those have been my sole IDE. So, in describing these new features, I also want to add how they have improved my work life.

Updates to Developing

One of the issues I would encounter while developing is running into that one key function that you know VS can do for you, but you can’t remember where it is. One of the more basic ideas of this is to format your code so it is spaced and indented correctly, especially after doing some refactoring.

I know that there are key bindings to do this, but I always forget. With Visual Studio 2019 they have added the search bar with an active search feature. This search allows you to start typing what you need, in my case “Format” and it displays my options. I can then click what I need, and it performs the action. But it doesn’t stop there; I can change my VS theme, find git command or view git history, create a new project, add a class, item, etc., and so much more. This search bar saves me tons of time, even when I know where to look!

image=”10575″

Another plus is the advancements in refactoring and IntelliCode, kind of like IntelliSense. I didn’t really notice these that much until recently when I had to go back to 2017 for a project. This is one of those items that works with you, makes things easier, and you don’t even realize it.

With the new ways to refactor, you highlight code and look at different options of how it could be written, change if statements to the opposite of what you are looking for (check for false instead of true), wrap selections in braces, and even more options. The IntelliCode is another one that helps out a lot, as it now guesses what you want to put into your code. Again this is one of those updates that you don’t notice until you don’t have it anymore.

Debugging Updates

Now we are getting into some of my favorite parts of the update. Visual Studio 2019 has added the ability to search through the Watch, Local, and Auto windows variables for certain values. If you have ever dealt with any kind of API, you have probably also dealt with the headache of needing to interact with that one item in a list of items. Maybe you add a small if statement to stop at a specific item in a loop. Or perhaps you scroll through your list to get to the one you want, well no longer!

With the new search feature, you can type in your search criteria, set how far deep into each object you want to search, and then go to each found item. The larger the dataset, the more issues you might run into. This is especially true if you must do deep searches (more than 3 deep). But I have found this tool to be super valuable.

Along with the search, they have also allowed the ability to change the display of the value in the window. So let’s say you want to see a string value of a local variable, but you don’t want the quotes to be present. Simply apply “{yourVariable}, nq” to your watch variable, and you will see the display. This has come in handy when I need to get an ID or other value and don’t want to worry about extra features.

There are also other format features you can utilize. After typing the “,” a dropdown will display with options, and a description will appear over any hover/selected item.

image=”10576″

image=”10577″

Live Collaboration

This has to be one of the best-added features to the 2019 suite. On my team, we have both local and remote developers. We are regularly reviewing and debugging code together for our various projects. Before, we would do this in an MS Teams screen share session. One team member would be showing and changing the code, and the other would be telling the lead where to go, what to type, what to fix, etc. Now with “Live Share,” we can start up a share session, join, and both be typing in the same file, view other files, debug together, or even review merge conflicts.

It allows all parties to add, change, delete code in the same solution at one time! This has cut down on our collaboration time by allowing us to edit inline with the other person. The session will even show you where someone is typing, the location of their cursor, and what they have changed. What’s even better is if you don’t have VS 2019, you can download an extension, get it here, for 2016 and join or start a session.

Don’t have Visual Studio? That’s ok too, all you need is VS Code, (download link), add the extension there and start joining/sharing.

image=”10578″

image=”10579″

These are just a few of the features that come with the new 2019 Visual Studio that I have found to be the most useful, but there are more to be utilized. If you are on the fence about whether to upgrade your IDE, all I can say is jump off, and start using VS 2019; you won’t regret it.