How can I attach the MVC 6 source code or dlls into my project so that I could debug into it. I need to see the actual flow of few things.
ASP. NET Core In Tools -> Options -> Debugging -> General, un-check Enable Just My Code. Verify Enable Source Link support is checked. In Tool -> Options -> Debugging -> Symbols, enable Microsoft Symbol Servers. When you step into any .NET or ASP.NET Core code, Visual Studio displays the source code. For example:
To debug.NET Framework source, you must: Enable stepping into.NET Framework source. Have access to debugging symbols for the code. You can choose to download debugging symbols immediately, or set options for later downloading.
Debug your application; set a breakpoint to the line of .NET code you wish to debug, and step to the desired code line with the debugger. Note: your application may start slower since it will download PDBs from the internet.
Verify Enable Source Link support is checked. In Tool -> Options -> Debugging -> Symbols, enable Microsoft Symbol Servers. When you step into any .NET or ASP.NET Core code, Visual Studio displays the source code. For example: Set a break point in OnGet in Pages/Privacy.cshtml.cs and select the Privacy link.
In the sources property, add the path(s) to the src folders that you got from github. For example:
{
"sources": [ "src", "D:\\dev\\aspnet\\mvc\\src" ]
}
Run and the sources in D:\dev\aspnet\mvc\src
should be used instead of the NuGet packages from NuGet/MyGet.
PS: Make sure you are using the sources and the packages from the correct branch. Otherwise you might hit strange issues like the one described here
As of beta4, the sources node in global.json has been changed to projects.
{
"projects": [ "src", "D:\\dev\\aspnet\\mvc\\src" ]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With