A matching symbol file was not found (Cannot find/open pdb file)

断了今生、忘了曾经 提交于 2019-12-18 15:29:31

问题


The debug point is not getting enabled when this module gets loaded. So I thought of manually loading its debug symbols .pdb file from "Debug/obj" folder.

In this case I am getting below error "A matching symbol" file was not found in this folder though that folder contains currently build file.

And also the "Symbol Load Information" contains these many directory paths.

Cannot find or open the PDB file.

PDB does not match 

Screenshot:


回答1:


This problem is fixed by the following steps-

1) Close all the instances of VISUAL STUDIO if running and open a single instance of Visual Studio

2) Close the solution (nothing but your project) If it's already open and then re-open again

3) Clean the whole project and rebuild it.

4) and also build the project if you are getting any errors like "___.dll not found"

5) Now you are good to go and run your project




回答2:


After breaking my head on this, for me it happened when I configured my project to seperate binaries from objects that way:
For Output directory:

$(SolutionDir)build\bin\$(PlatformTarget)-$(Configuration)\

For Intermediate Directory:

$(SolutionDir)build\obj\$(PlatformTarget)-$(Configuration)\$(ProjectName)\

Even though the I still had the generated .pdb where my exe or trying to even load it manually, it didn't work. So I went again to Configuration Properties -> Linker -> Debugging and where the property Generate Program Database File I changed from $(OutDir)$(TargetName).pdb to $(IntDir)$(TargetName).pdb so it will throw the desired database file into the place where the objects(Intermediate Directory) are instead of where the .exe(Output directory). Hopefully that helped someone :)



来源:https://stackoverflow.com/questions/39599663/a-matching-symbol-file-was-not-found-cannot-find-open-pdb-file

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