There are two new additions to Visual Studio 2019, full .NET Core 3.0 support and Data Breakpoints.
When .NET Core 3.0 is released later on this year, it will be fully supported by the latest version of Visual Studio. .NET Core 3.0 (currently in Preview 3) is already supported within the IDE, but Microsoft decided to delay its full release until the autumn, when it will be fully integrated. However, it currently needs to be installed separately and enabled within the IDE.
Once you have installed and enabled support for .NET Core 3.0 you can play with a very useful new feature, Data Breakpoints. Once available only to C++ developers, it has now been adapted to work with .NET Core 3.0 applications. This feature allows you to break your execution, and jump into the debugger, when a variable’s value changes. This makes finding where a global objected is being modified very easy.
Visual Studio 2019 was released this week and it is now available to download and use from Microsoft. Check which edition is right for you and download it.
Over the next few weeks I will try to cover some the new features in this version. However, I would like to start with something that’s been close to my heart recently. The ability to easily decompile external resources.
We have all been stuck trying to fix a bug in our code only to be mystified at the output of a NuGet package, or an external library that is used in our code. Not knowing what’s going on within an external module, during debugging, is very frustrating. Having to deal with a black box situation makes life complicated. Developers always had the ability to use tools such as ildasm to decompile third party libraries, so they can take a look at what might be causing the issue they are trying to resolve. But having to interupt your debug flow mid way to look at a separate application to figure out what’s going on is not very intuitive.
With Visual Studio 2019, the ability to step into third party decompiled source code is now a check box away!
To enable this feature, simply select Tools > Options. Type “decompile” into the search bar and then choose the Advanced section of Text Editor for C#.
This is still an experimental feature, but extremely useful.