Cannot step into .NET framework source with VS2008 SP1

孤者浪人 提交于 2019-12-20 09:19:13

问题


Somehow my VS2008 SP1 has lost the ability to step into .NET framework sources. I've played around with checkboxes to no end; I've re-deleted the Symbol cache folder a dozen times; and I've tried all kinds of debug symbol servers.

All it does is download some .PDB files, but when I try to select a stack frame in .NET, I always get the message about no source available and "do you want to view disassembly".

What gives?

Added: Web application; Windows Vista Business x32; .NET 3.5 SP1.


回答1:


I believe your problem is a mismatched version of .Net running on your System compared to the image version in the pdb that downloads from the symbol server. I've had the same problem on 64 bit Vista and Win7. I have yet to find a reference for how to get the assembly to 2.0.5.xxxx as indicated in the instructions. SP1 with all service packs on the two OSs I indacated are show the assemblies at 2.0.0.xxxx

EDIT: Start debugging any app you have and Hit CTRL+ALT+U to get the module list. It shows which assembly in the GAC is being used for the application

I blogged what I think is a better description of the problem. Blog of problem




回答2:


When you enter debugging mode, open the Modules window, right click on the framework component and choose to load source from the Microsoft servers.




回答3:


I was having problem that i cant step into to the Framework source code.

Then i went to project settings, and set Target Platform to "Any CPU", and then magic happened, by default Target Platform setting was "x86".

My platform Win7 x64, VS2010




回答4:


I've run into this a few times in 2005. Much of this is voodoo and probably irrelevant, but somewhere in here is the answer (that works for me):

  1. Kill the service
  2. Delete any local .pdbs
  3. Get rid of the temp files in (for example) C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files (either just the project-related files or all of them)
  4. Restart service
  5. If that didn't work, repeat 1-4, reboot and then try



回答5:


I've noticed that if this issue occurs when you're running a website, enabling HTTP keep-alives in IIS can fix it.




回答6:


I've encountered the same issue on different machines. I get it right now on Win7 x86 with .NET v2.0.50727 CLR (3.5sp1). The most quoated post doesn't help. Notice that "Microsoft Symbol Server" is NOT source server with .NET sources. It hosts PDBs without source info (non-indexed). For .NET sources we need indexed PDBs from "http://referencesource.microsoft.com/symbols" and enable source server support. But sometimes it stops working. I guess the issue with being unable to download indexed .net's PDBs (as mentioned earlier) is related to version conflicts.

I can say only this:

WinServer 2008 R2 3.5.30729.4926 - works

Win7 x86 3.5.30729.4918 - doens't work

What I mean by "doesn't work": try to "load from symbols path" (from Module or Stack windows, doesn't matter) and get dialog for choosing .pdb (positioned in e.g. C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.pdb ). That is VS can't download pdb for dll. Absolutly the same actions on WinSrv2008r2 makes VS download pdb and (if source server support is enabled) sources.




回答7:


Try this instruction, I got everything works fine!



来源:https://stackoverflow.com/questions/561724/cannot-step-into-net-framework-source-with-vs2008-sp1

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