无法找到或打开 PDB 文件消息,pdb 存在
我正在使用最近升级的 Visual Studio 2010。该解决方案包含 25 个项目,生成十几个 dll 和 exe。我正在尝试调试一个特定问题,但由于符号未加载而无法调试。
我收到“无法找到或打开 PDB 文件”的消息,这是项目生成的 DLL 之一的 PDB 文件,所有其他 PDB 文件都加载得很好。 PDB 文件与 dll 位于同一目录中,我还清理并重建了解决方案。
此外,我还对 pdb 名称运行了进程资源管理器过滤,这表明它已成功找到、打开和读取。奇怪的是,它还继续在其他位置寻找 pdb。
有人对此有什么想法吗?
I am using Visual Studio 2010, recently upgraded. The solution contains 25 projects, makes a dozen dll's and exe's. I am trying to 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在大多数情况下,Visual Studio 会出现文件句柄问题。 Visual Studio 将 PDB 视为由进程使用,但该进程是 Visual Studio(我知道,有点愚蠢)。
尝试重新启动计算机并在构建之前手动删除 PDB 文件。这通常对我有用。
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.
您是否有多个项目或构建输出相同的 PDB 文件?我有一个可以编译为 EXE 或 DLL 的项目。当然,默认情况下,他们会重写彼此的 PDB 文件。所以VS会检测到PDB不匹配。
当我迁移到 VS2010 时,我通过将所有项目和配置的目标名称设置为“$(ProjectName)_$(Configuration)”解决了这个问题。
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.
在调试中打开 Microsoft Symbols Server ->选项和设置 ->调试->符号
Turn on Microsoft Symbols Server in Debug -> Options and Settings -> Debugging -> Symbols