Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to step into MVC4 source code without building assembly

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 source. I would think a symbol look up from a server would be preferable but have not been able to make this happen.

Ideas?

like image 729
Eat at Joes Avatar asked Nov 28 '12 16:11

Eat at Joes


People also ask

What is scaffolding in MVC with example?

Scaffolding is used to define the code-generation framework used in web applications. It uses T4 templates to generate basic controllers and views for the models. It generates instances for the mapped domain model and code for all CRUD operations.

Is .NET MVC open source?

It has just been announced that ASP.NET MVC has been released under Microsoft's open source license. The Microsoft Public License is certified by the Open Source Initiative, making is appropriate for most projects requiring an open source license including Novell's Mono.


1 Answers

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.

like image 94
Darin Dimitrov Avatar answered Sep 28 '22 08:09

Darin Dimitrov