'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.
These are my debug settings (I have no idea weather .NET Framework source stepping has any significance for .NET Core projects):
So lets run and hit an exception:
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:
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:
It complains, so let's enable source servers.
Lets run it again, and hit the exception.
Now it complains on some kind of exclusion (see symbol status column):
I load all the symbold manually:
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:
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 |










