How to debug System.Web.dll?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 21:56:21

问题


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!


回答1:


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!




回答2:


You need to follow this guide to be able to debug the.Net framework source code:

https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-debug-dotnet-framework-source?view=vs-2019




回答3:


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



来源:https://stackoverflow.com/questions/56143510/how-to-debug-system-web-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!