11

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.

1

2 Answers 2

6
  1. Clone the repo(s) that you want for debugging from GitHub
  2. Add a global.json file to your solution, similar to the one here
  3. 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" ]
    }
    
  4. 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

Sign up to request clarification or add additional context in comments.

4 Comments

What's the proper way of building the downloaded source? I receive so many error no matter which repo i get. Are there any steps involved?
Can you give more details about the errors? The code should build without any additional steps. All you need is to have the latest KRE, assuming you got the code from the dev branch.
This is what I did to get me throughhttps://github.com/dotnet/cli/issues/2966#issuecomment-245876542
how about new version of visual studio that does not have global.json?
3

As of beta4, the sources node in global.json has been changed to projects.

{
    "projects": [ "src", "D:\\dev\\aspnet\\mvc\\src" ]
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.