0

I want to see what happens inside System.Web.dll in ASP.NET MVC Application.

I have VS 2017 and ASP.NET MVC Application. I loaded debug symbols for System.Web.dll. After that call stack changed color from grey to black. But if trying click on any line in call stack for System.Web.dll, source code is not appearing and instead this is shown the message: Source information is missing from the debug information for this module (screenshot)

I am want seeing and debugging code of System.Web.dll. Could anyone help me with it? Thanks!

  • Go Debug menu=>Options to make sure:1. Uncheck `Enable just my code` 2.Check `Enable .net framework source stepping`, `Enable Source server support` , `Enable Source link support` 3.In Debugging=>Symbols=>Enable Microsoft Symbol Servers – LoLance May 15 '19 at 08:55
  • I did it at the very beginning. But instead source code there is "Source information is missing from the debug information for this module" message. – Volodymyr V. May 15 '19 at 10:23
  • You may get some help from [this link](https://stackoverflow.com/questions/42693502/how-do-i-debug-net-4-6-framework-source-code-in-visual-studio-2017). – LoLance May 16 '19 at 09:11
  • Lance Li-MSFT, thank you very much! By link that you gave, first step says "Ensure https://referencesource.microsoft.com/ contains the exact version you're debugging". In my application was used version 4.6.1, but referencesource.microsoft.com references on version 4.8. After I installed version 4.8 everything worked out! – Volodymyr V. May 16 '19 at 10:59
  • Glad to know it helps! – LoLance May 17 '19 at 01:33

2 Answers2

1

Step 1: You can download source code of System.Web.dll at this link

https://github.com/microsoft/referencesource

Step 2: Add project for System.Web to your solution

Step 3: Remove System.Web.dll from reference in your solution.

Step 4: Add > Reference > Select Solution tab > Select projects > System.Web project

Step 5: Rebuild and set breakpoints in System.Web source code to debug

Hien Nguyen
  • 24,551
  • 7
  • 52
  • 62
  • Unfortunately, it does not work. What i did: 1. Downloaded https://github.com/microsoft/referencesource 2. Copied System.Web into separate directory. 3. In VS "File\New\Project from existing code" and selected directory from step 2, output type specified as class library. I am trying build project but getting greater than 7000 errors. Some errors can be fixed by adding links to related assemblies. But some errors (like 'AssemblyRef' is inaccessible due to its protection level) I dont know how to fix. And the total number of errors is just scary. – Volodymyr V. May 15 '19 at 10:03
0

Thanks to Lance Li-MSFT I solved problem!

By link that you gave, first step says "Ensure https://referencesource.microsoft.com/ contains the exact version you're debugging". In my application was used version 4.6.1, but referencesource.microsoft.com references on version 4.8.

After I installed version 4.8 everything worked out!

Thanks to all for help!

  • 1
    How do you Ensure https://referencesource.microsoft.com/ contains the exact version you're debugging? What are the steps to do this in Visual studio? I see nothing. – Adam Bruss Sep 03 '20 at 16:26
  • Sorry for the late answer, but maybe someone else might find the answer useful. At the top of the page which the link above targets, you may see Reference Source .NET Framework 4.8 – Volodymyr V. Jun 15 '21 at 12:45