Search code examples
.netasp.net-mvcdebuggingvisual-studio-debugging

Debugging Asp.net MVC 5.2.3 source code


My goal is to debug Asp.net MVC 5.2.3 source code.

  1. I created Asp.net MVC application in Visual Studio 2013 and updated all NuGet packages.
  2. Set up VS2013 as described in https://referencesource.microsoft.com/setup.html
  3. Added http://referencesource.microsoft.com/symbols, https://nuget.smbsrc.net, http://srv.symbolsource.org/pdb/Public, http://srv.symbolsource.org/pdb/MyGet, http://msdl.microsoft.com/download/symbols https://nuget.smbsrc.net to symbols

But when I'm trying to "Step Into" View method of Controller I see "Controller.cs not found". When I'm trying to navigate to stack trace I see "downloading source code from https://nuget.smbsrc.net/" but the source code does not download.

Is it possible to debug source code of Asp.net MVC 5.2.3?

Update 1 I have changed symbols list. Actual is:

After this changes, in modules window exists next logs:

https://nuget.smbsrc.net: Symbols downloaded from symbol server. *****\AppData\Local\Temp\SymbolCache\System.Web.Mvc.pdb\5878BE5BDA9D485C84CA1F292E2AD75E1\System.Web.Mvc.pdb: Symbols loaded.

As we can see pdb file is loaded. But when I navigate to source code it won't open. enter image description here

It seems that source code does not exist on nuget.smbsrc.net


Solution

  • I've found solution!

    I set up VS as described on http://www.symbolsource.org/Public/Wiki/Using but with one exception. I've deleted http://srv.symbolsource.org/pdb/Public from symbol list. I noticed, symbols that downloads from http://srv.symbolsource.org/pdb/Public trying to download source code from https://nuget.smbsrc.net, but symbols that downloaded from http://srv.symbolsource.org/pdb/MyGet download source code from symbolsource.org.

    If you want debug Asp.net mvc 5.2.3 just delete http://srv.symbolsource.org/pdb/Public from symbol list and ensure that pdb files downloaded from http://srv.symbolsource.org/pdb/MyGet