'I'm not able to debug .NET Core source code

Yes, I know that this question arises from time to time, I have searched for answer on internet, but nothing seems to work right. So I prepared I detailed explanation, accompanied by screenshots, on what I tried to do to be able to follow code execution throught .NET Core source code and what was the result.

I'm using Visual Studio Community 16.8.3, and have created a .NET Core 3.1 web app from template. I changed the code in Startup class to make it crash.

enter image description here

These are my debug settings (I have no idea weather .NET Framework source stepping has any significance for .NET Core projects):

enter image description here

So lets run and hit an exception:

enter image description here

Here I'll choose just to decomplie the source code (there's a link for it on the previous image), to see if this works:

enter image description here

OK, but I just see the code, can't examine variable and object values. Let's rerun and see if I can get the code by clicking on the symbol server when the exception hits:

enter image description here

It complains, so let's enable source servers.

enter image description here

Lets run it again, and hit the exception.

enter image description here

Now it complains on some kind of exclusion (see symbol status column):

enter image description here

I load all the symbold manually:

enter image description here

Here I rerun the app, with all the symbols loaded, but when the exception hits I still can't F11 into the .NET Core source:

enter image description here

What am I missing to be able to step throught the .NET Core source code?



Solution 1:[1]

The exception says that public method Configure is missing in Startup class. The application did not start properly and that is why debugging does not work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Martin Staufcik