简体   繁体   English

Visual Studio 2010“无法找到或打开PDB文件”

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

I try to debug a program in Visual Studio 10, but I have a problem with breakpoints. 我尝试在Visual Studio 10中调试程序,但是我遇到了断点问题。 I put *.pdb files corresponding to the *.dll files to the same directory. 我将* .pdb文件对应的* .pdb文件放到同一目录中。 But while checking modules, I see that each DLL file is signed as Cannot find or open the PDB file . 但是在检查模块时,我看到每个DLL文件都被签名为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? 如何查看预期* .pdb文件所在的位置?

The modules (Ctrl-D, M) is a good place to sort out whats going on so you're in the right area. 模块(Ctrl-D,M)是一个很好的地方,可以解决最新情况,因为你在正确的区域。

Right-click the module/dll you expected the pdb to be found for and select Symbol Load Information 右键单击您希望找到pdb的模块/ dll,然后选择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. 它应该与你的dll开始时在同一个目录中,如果它发现pdb将加载它或告诉你pdb文件与dll不匹配。

Go to Debug -> Options and Settings -> Debugging -> Symbols, check Microsoft Symbol Servers under Symbol Locations. 转到调试 - >选项和设置 - >调试 - >符号,检查符号位置下的Microsoft符号服务器。 See attached photo. 见附图。

包括符号

I had a similar problem in VS2013 ... something to do with a PDB file and IISEXPRESS. 我在VS2013中遇到了类似的问题......与PDB文件和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! 重新运行我的应用程序后,Visual Studio重新加载所有符号需要一段时间,但它最终确实这样做了,问题得到解决!

In my case, I was debugging a click-once windows app. 就我而言,我正在调试一次点击一次的Windows应用程序。 In the module's Symbol Load Information , it told me the pdb was out of sync with the currently attached image. 在模块的Symbol Load Information ,它告诉我pdb与当前附加的图像不同步。 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. 这导致模块列表说我正在调试的程序集加载符号 ,并继续调试问题。

Change Project Directory like if you run/debug code in Windows system directory it wont execute with admin permission, 更改项目目录,就像在Windows系统目录中运行/调试代码一样,它不会以管理员权限执行,

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 在我的情况下,我保存我的项目在C:驱动器,而我执行代码我抛出访问冲突读取输入数据错误然后我尝试从不同的位置,它工作正常

& also you have to load module as well 而且你也必须加载模块

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM