加载转储文件; VS 找不到我的源代码
我正在 VS 2010 中开发一个 .NET 4.0 应用程序。
我第一次尝试使用转储文件,但是当将小型转储加载到 VS 中时,我无法调试它,因为 VS 找不到源文件。
这就是我所做的:
- 在
Options ->调试-> Symbols
我添加了应用程序的构建目录,其中包含 pdbs。 - 在 VS 调试器中运行应用程序。选择
调试->全部打破
。 - 选择
调试->将转储另存为
- 转到 Windows 资源管理器中的转储文件并将其打开。这将打开 VS 的一个新实例。
- 我单击“混合调试”。这打开了一个新选项卡,上面写着
“当前位置没有可用的源代码
。
我试图找出为什么 VS 没有加载我的 pdb:
- 打开
调试 -> Windows - > 模块
- MyApp.exe 的
符号状态
列显示“已加载符号”。 - MyApp.vshost.exe,它显示“无法找到或定位 PDB 文件”。
- 对于 MyApp.exe,选择“符号加载信息”。它显示“MyApp.pdb:已加载符号。”
- 它显示 vshost32.pdb:无法找到或打开 PDB 文件。 /em>.(由于某种原因,请注意它如何查找名为 vshost32.pdb 而不是 MyApp.vshost.pdb 的文件)
那么,有什么想法吗?
I'm developing a .NET 4.0 app in VS 2010.
I'm trying to use dump files for the first time, but when loading the minidump into VS, I can't debug it, since VS doesn't find the source files.
Here's what I did:
- In
Options -> Debugging -> Symbols
I added my app's build dir, which contains the pdbs. - Ran the app in the VS debugger. Selected
Debug -> Break All
. - Selected
Debug -> Save dump as
- Went to the dump file in windows explorer and opened it. This opened a new instance of VS.
- I clicked "Debug with mixed". This opened a new tab that said
"There is no source code available for the current location
.
I tried to figure out why VS wasn't loading my pdbs:
- Opened
Debug -> Windows -> Modules
- The
Symbol Status
column for MyApp.exe said "Symbols loaded". - For MyApp.vshost.exe it said "Cannot find or locate the PDB file".
- Rightclicked on MyApp.exe, selected "Symbol load info". It said "MyApp.pdb: Symbols loaded."
- Did the same for MyApp.vshost.exe. It said vshost32.pdb: Cannot find or open the PDB file.. (note how it's looking for a file named vshost32.pdb rather than MyApp.vshost.pdb, for some reason)
So, any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了问题。 VS 正在查看调用堆栈中最底层的方法,这是 ntdll.dll 中某处的系统方法。那么自然就没有来源了。我必须在
Call Stack
窗口中单击我自己的方法才能导航到我自己的代码,该代码的源可用。Solved the problem. VS was looking at the bottom-most method in the call-stack, which was a system method somewhere in ntdll.dll. So naturally there was no source for it. I had to click on my own method in the
Call Stack
window to navigate to my own code, for which source was available.