I am using Visual Studio 2010, recently upgraded. The solution contains 25 projects, makes a dozen dll's and exe's. I am trying t开发者_JS百科o debug a particular problem and I can't due to symbols not being loaded.
I get the "Cannot find or open the PDB file", this is for a PDB file one of the DLL's the project generates, all the other PDB files load just fine. The PDB file exists in the same directory as the dll, I have also cleaned and rebuilt the solution.
In addition I have ran process explorer filtering on the pdb name, this indicated that it was found, opened and read successfully. Oddly it also continued to look in other locations for the pdb as well.
Anyone have any thoughts on this?
In most cases Visual Studio has problems with the file handles. Visual Studio sees the PDB as being used by a process, but that process is Visual Studio (I know, kinda stupid).
Try rebooting the machine and manually deleting the PDB file before build. That usually works for me.
Are you getting multiple projects or builds outputting the same PDB file? I had a project that I could compile as a EXE or a DLL. Of course, by default, they over wrote each others PDB file. So VS would detect that the PDB doesnt match.
When I moved to VS2010, I solved this issue by setting Target Name to "$(ProjectName)_$(Configuration)" for ALL projects and configurations.
Turn on Microsoft Symbols Server in Debug -> Options and Settings -> Debugging -> Symbols
精彩评论