vb.net 无法加载 PDB。“在此文件夹中找不到匹配的符号文件。”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32059234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot get PDB to load. "A matching symbol file was not found in this folder."
提问by CBRF23
I've got a project that debugging was working just fine about an hour ago, and now after the latest rebuild I can't get it to load the symbol files, so I cannot hit my breakpoints.
我有一个项目,大约一个小时前调试工作得很好,现在在最新的重建之后,我无法让它加载符号文件,所以我无法达到我的断点。
I've tried everything suggested here on Fixing “The breakpoint will not currently be hit. No symbols have been loaded for this document.”and cannot get it to load my PDB. There are a ton of questions on .PDB files not loading here on SO and I've spent the last hour going through as many of them as I can and trying everything suggested, but to no avail.
我已经尝试了这里建议的所有修复“当前不会命中断点。尚未为该文档加载任何符号。” 并且无法让它加载我的 PDB。有很多关于 .PDB 文件没有在 SO 上加载的问题,我花了最后一个小时尽可能多地浏览它们并尝试建议的所有内容,但无济于事。
I've tried Build>Rebuild Solution, Build>Clean+ Build>Build Solution, Build>Clean+ Build>Rebuild Solution, manually deleting all files from the BIN output folder + Build Solutionand/or Rebuild Solution. The same thing happens in each case; the compiler creates a brand spanking new .DLL and .PDB file, yet the .PDB refuses to load at runtime.
我试过Build>Rebuild Solution, Build>Clean+ Build>Build Solution, Build>Clean+ Build>Rebuild Solution,从 BIN 输出文件夹 +Build Solution和/或Rebuild Solution. 在每种情况下都会发生同样的事情;编译器创建了一个全新的 .DLL 和 .PDB 文件,但 .PDB 拒绝在运行时加载。
I've even tried Debug>Windows>Modules>[Right-Click on offending symbol library]>Load Symbolsand I manually browsed to the correct .PDB file, but when I hit Openit just tells me "A matching symbol file was not found in this folder".
我什至尝试过Debug>Windows>Modules>[Right-Click on offending symbol library]>Load Symbols并手动浏览到正确的 .PDB 文件,但是当我点击Open它时只是告诉我“在此文件夹中找不到匹配的符号文件”。
Using Debug>Windows>Modules>[Right click...]>Load Symbol Informationgives me:
使用Debug>Windows>Modules>[Right click...]>Load Symbol Information给了我:
C:\Windows\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\bin\Debug\ssoederPDMupgrade.pdb: PDB does not match image. C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\obj\Debug\ssoederPDMupgrade.pdb: PDB does not match image. C:\Windows\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\Windows\symbols\dll\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\Windows\dll\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\ssoederPDMupgrade.pdb\afe14027e9c6490883d12f2f139cb5911\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\ssoederPDMupgrade.pdb\afe14027e9c6490883d12f2f139cb5911\ssoederPDMupgrade.pdb: Cannot find or open the PDB file. C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\obj\Debug\ssoederPDMupgrade.pdb: PDB does not match image. SYMSRV: C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\ssoederPDMupgrade.pdb\AFE14027E9C6490883D12F2F139CB5911\ssoederPDMupgrade.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/ssoederPDMupgrade.pdb/AFE14027E9C6490883D12F2F139CB5911/ssoederPDMupgrade.pdbnot found
http://msdl.microsoft.com/download/symbols: Symbols not found on symbol server.
C:\Windows\ssoederPDMupgrade.pdb:无法找到或打开 PDB 文件。C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\bin\Debug\ssoederPDMupgrade.pdb:PDB 与图像不匹配。C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\obj\Debug\ssoederPDMupgrade.pdb:PDB 与图像不匹配。C:\Windows\ssoederPDMupgrade.pdb:无法找到或打开 PDB 文件。C:\Windows\symbols\dll\ssoederPDMupgrade.pdb:找不到或打开 PDB 文件。C:\Windows\dll\ssoederPDMupgrade.pdb:无法找到或打开 PDB 文件。C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\ssoederPDMupgrade.pdb\afe14027e9c6490883d12f2f139cb5911\ssoederPDMupgrade.pdb:无法找到或打开 PDB 文件。C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\ssoederPDMupgrade.pdb\afe14027e9c6490883d12f2f139cb5911\ssoederPDMupgrade.pdb:无法找到或打开 PDB 文件。C:\VS_TestFolder\EPDMAddIns\ssoederPDMupgrade\obj\Debug\ssoederPDMupgrade.pdb:PDB 与图像不匹配。SYMSRV: C:\Users\ssoeder\AppData\Local\Temp\SymbolCache\ssoederPDMupgrade.pdb\AFE14027E9C6490883D12F2F139CB5911\ssoederPDMupgrade.pdb 未找到
SYMSRV:http://msdl.microsoft.com/download/symbols/ssoederPDMupgrade.pdb/AFE14027E9C6490883D12F2F139CB5911/ssoederPDMupgrade.pdb 未找到
http://msdl.microsoft.com/download/symbols:在符号服务器上找不到符号。
采纳答案by CBRF23
Not much of an answer but...
I think something became corrupt in VS Express 2013. I have no idea how or why - and I may be totally wrong here, but the simple matter is what got my breakpoints working was installing VS Community 2015.
答案不多,但是...
我认为 VS Express 2013 中的某些内容已损坏。我不知道如何或为什么 - 我在这里可能完全错了,但简单的问题是让我的断点工作的原因是安装 VS Community 2015 .
After installing VS Community 2015 (VSC 2015) the symbol file loads without problem, and all breakpoints are hit. This also got everything working in my existing VS Express 2013 (VSC 2013) installation, so I can work in either one now without problem.
安装 VS Community 2015 (VSC 2015) 后,符号文件加载没有问题,并且所有断点都被命中。这也使我现有的 VS Express 2013 (VSC 2013) 安装中的所有内容都可以正常工作,因此我现在可以在其中任何一个中正常工作。
Event timeline:
事件时间线:
I've been working in VSE 2013 on this same project for a month or two now. Writing a class library, debugging using
Debug>Attach to process.I made some changes yesterday to code within a single class module (no other changes) and used
Build>Rebuild Solutionto clean and re-generate the current configuration (DEBUG) output files.Event horizon:I went to debug using
Attach to processas usual, and my break point appeared hollow with the message it would not be hit because no symbols had been loaded.I spent quite a bit of time trying to work this out before posting here (see my original question for details on what was tried).
Received suggestion from @HansPassant regarding use of
Symchkfrom command line. Tried to follow instructions linked to and was unable to get it working - command line didn't recognizeSymchkorSymchk.exeas valid commands/processes/etc.I downloaded WDK 8.1 updateand installed.
Opened VSE 2013, received an error message regarding a driver failing to load, application froze before loading up. Actually, after trying multiple times I found it would sometimes get to the welcome screen - but remained unresponsive even then.
Went on M$ VS site to download latest copy of VSE 2013 installation files to do a repair-install, and I noticed there was a newer version: VSC 2015.
Downloaded and installed VSC 2015.
Opened project, started debugging by using
Debug>Attach to processand it worked- all symbols loaded and my breakpoints worked. NOTE: I changed nothing with the project * - just opened it and ran.
* unless some changes are made by the IDE unbeknownst to me just by opening the project.This seemed to repair whatever driver was corrupted in the VS2013 install as well, as I went back to VSE 2013 and it opened without error ANDI was able to open the same project and do
Attach to processand all symbols loaded and breakpoints are working again.
我已经在 VSE 2013 的同一个项目中工作了一两个月了。编写类库,调试使用
Debug>Attach to process.我昨天对单个类模块中的代码进行了一些更改(没有其他更改),并用于
Build>Rebuild Solution清理和重新生成当前配置 (DEBUG) 输出文件。事件视界:我
Attach to process像往常一样去调试,我的断点显得空洞,并显示不会被命中的消息,因为没有加载符号。我花了很多时间在这里发帖之前尝试解决这个问题(有关尝试的详细信息,请参阅我的原始问题)。
从@HansPassant 收到关于使用
Symchk命令行的建议。试图按照链接到的说明进行操作,但无法使其工作 - 命令行无法识别Symchk或Symchk.exe作为有效的命令/进程/等。我下载并安装了WDK 8.1 更新。
打开 VSE 2013,收到一条关于驱动程序加载失败的错误消息,应用程序在加载前冻结。 实际上,经过多次尝试后,我发现它有时会进入欢迎屏幕 - 但即使如此仍然没有响应。
去 M$ VS 站点下载最新的 VSE 2013 安装文件副本进行修复安装,我注意到有一个更新的版本:VSC 2015。
下载并安装了 VSC 2015。
打开项目,通过使用开始调试
Debug>Attach to process并且它工作- 所有符号加载并且我的断点工作。注意:我对项目 * 没有做任何更改 - 只是打开它并运行。
*除非 IDE 仅通过打开项目进行了一些我不知道的更改。这似乎也修复了 VS2013 安装中损坏的任何驱动程序,因为我回到 VSE 2013 并且它打开没有错误,我能够打开同一个项目并执行
Attach to process所有符号加载和断点再次工作。
回答by Massimo Della Calce
I had the same problem with VS2013 Ultimate. I did a clean and build of the assembly several times, and I deleted all temporary files from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files.
我在 VS2013 Ultimate 上遇到了同样的问题。我对程序集进行了多次清理和构建,并从C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files.
I also verified that in "Debug -> Options and Settings -> Symbols", there were no modules excluded... in the end, I found a reference that was different from that deployed into the GAC.
我还验证了在“调试-> 选项和设置-> 符号”中,没有排除任何模块……最后,我找到了一个与部署到 GAC 中的引用不同的引用。
回答by Sam_Carmichael
I'm glad you got it to work CBRF23! I had this problem when trying to compile a DirectX effect file in DevC++. The easiest way I found of downloading pdbs is to first download WinDBG here: http://go.microsoft.com/fwlink/p/?LinkId=536682Then as an example, say you want to download d3dx9d.pdb. copy d3dx9d.dll from C:\windows\system32 and paste another copy into your (debugger) windbg symchk.exe folder, then connect to your internet server, go to the windows start menu, Run: [then type] cmd [press enter], next go to the windbg debugger folder by going to the Command Prompt (MS-DOS Window) (if it's in the C:\windbg_6p12p0002p633\debugger_x86 folder for example, then type):
我很高兴你让它在 CBRF23 上工作!我在 DevC++ 中尝试编译 DirectX 效果文件时遇到了这个问题。我发现下载 pdbs 的最简单方法是首先在此处下载 WinDBG:http: //go.microsoft.com/fwlink/p/?LinkId=536682 然后作为示例,假设您要下载 d3dx9d.pdb。从 C:\windows\system32 复制 d3dx9d.dll 并将另一个副本粘贴到您的(调试器)windbg symchk.exe 文件夹中,然后连接到您的 Internet 服务器,转到 Windows 开始菜单,运行:[然后键入] cmd [按回车键] ],接下来通过转到命令提示符(MS-DOS 窗口)转到 windbg 调试器文件夹(例如,如果它在 C:\windbg_6p12p0002p633\debugger_x86 文件夹中,则键入):
cd windbg_6p12p0002p633[enter] cd debugger_x86
cd windbg_6p12p0002p633[输入] cd debugger_x86
[and finally type the following but change the double asterisk** to one asterisk *:]
[最后输入以下内容,但将双星号**更改为一个星号*:]
symchk /if d3dx9d.dll srv**c:\symbols*\mainserver\symbols*https://msdl.microsoft.com/download/symbols
symchk /if d3dx9d.dll srv**c:\symbols*\mainserver\symbols* https://msdl.microsoft.com/download/symbols
Please note again, that there is only supposed to be one asterisk after srv (the post would interpret an asterisk as italic or bold), not two then it will open symchk.exe and download the pdb symbol file associated with the inputted dll into the created C:\symbols\ folder automatically!
请再次注意,在 srv 之后应该只有一个星号(该帖子会将星号解释为斜体或粗体),而不是两个,然后它将打开 symchk.exe 并将与输入的 dll 关联的 pdb 符号文件下载到自动创建 C:\symbols\ 文件夹!
回答by David BS
Did you try these steps?
你试过这些步骤吗?
1- delete the .SUO file
1-删除.SUO文件
2- make a CLEAN BUILD.
2- 做一个干净的建筑。
3- make a BUILD PROJECT
3- 制作一个BUILD PROJECT

