Visual Studio 2010 “Cannot find or open the PDB file”

情到浓时终转凉″ 提交于 2019-12-17 09:49:44

问题


I try to debug a program in Visual Studio 10, but I have a problem with breakpoints. I put *.pdb files corresponding to the *.dll files to the same directory. But while checking modules, I see that each DLL file is signed as Cannot find or open the PDB file.

How can I fix this problem? How can I check where *.pdb files are expected to be located?


回答1:


The modules (Ctrl-D, M) is a good place to sort out whats going on so you're in the right area.

Right-click the module/dll you expected the pdb to be found for and select Symbol Load Information

It should look in the same directory as your dll to begin with and if it finds the pdb will either load it or tell you that the pdb file doesnt match the dll.




回答2:


Go to Debug -> Options and Settings -> Debugging -> Symbols, check Microsoft Symbol Servers under Symbol Locations. See attached photo.




回答3:


I had a similar problem in VS2013 ... something to do with a PDB file and IISEXPRESS. I tried several things and eventually resolved it by doing this:

Tools > Options > Debugging > Symbols and then pressing the "Empty Symbol Cache" button

Upon rerunning my app, it took awhile for Visual Studio to reload all of the symbols but it did eventually do so and the problem was fixed!




回答4:


In my case, I was debugging a click-once windows app. In the module's Symbol Load Information, it told me the pdb was out of sync with the currently attached image. I had to review the whole list not just the top or bottom item, to get that error text.

That told me to recompile and re-publish what I was attaching to, so the two would match. That caused the module list to say Symbols loaded for my assembly that I was debugging, and to go on and continue debugging the issue.




回答5:


Change Project Directory like if you run/debug code in Windows system directory it wont execute with admin permission,

in my case i save my project in C: drive and while i execute code i throw access violation to read input data error then i try it from different location and it work fine

& also you have to load module as well



来源:https://stackoverflow.com/questions/8412851/visual-studio-2010-cannot-find-or-open-the-pdb-file

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