The .NET framework is under heavy development and bugs are removed by Microsoft developers when found. However, you may still experience major bugs that might cause your application to crash. Sometimes it is even hard to determine whether it is a bug in your own code or in the framework. This issue has been taken to a new level in Visual Studio 2019. A feature, which by default is disabled in Visual Studio, enables you to debug the entire .NET source code directly within VS2019. Previously tools like .NET Reflector and ILSpy were required to identify any bugs in the .NET framework.
To enable .NET framework code debugging, please do the following:
1) In Visual Studio 2019, select Debug > Options…
The Options dialog is displayed.
2) Select Debugging in the left menu (se picture below) and check the option Enable .NET Framework source stepping.
When running your application in debug mode, Visual Studio will download the .NET source code when needed. Please be aware that the source code might use a lot of free space on your hard drive depending on how many .NET assemblies that are in use.