How to step into MVC4 source code without building assembly

后端 未结 1 1519
挽巷
挽巷 2020-12-07 10:25

Is there an easy way to step through the MVC 4 source from within my solution?

I found this question but the solution requires building the MVC 4 assembly from sourc

相关标签:
1条回答
  • 2020-12-07 10:39

    Add the following symbol servers to your Visual Studio and you are good to go:

    • http://referencesource.microsoft.com/symbols
    • http://srv.symbolsource.org/pdb/Public
    • http://srv.symbolsource.org/pdb/MyGet
    • http://msdl.microsoft.com/download/symbols

    Here's how mine look like:

    Options Dialog with Symbols Configured

    Also you need to configure your debugger to use them:

    1. Tools -> Options -> Debugger -> General.
    2. Uncheck "Enable Just My Code (Managed only)"
    3. Check "Enable .NET Framework source stepping"
    4. Check "Enable source server support"
    5. Uncheck "Require source files to exactly match the original version"

    Oh and of course don't forget to revert those settings back when you no longer need to debug in .NET sources or otherwise debugging might become a painfully slow experience for you.

    0 讨论(0)
提交回复
热议问题