【转载】VS2010 C++ Debug 出现“Cannot find or open the...

本文介绍了在使用VS2010进行Debug模式调试时遇到的关于PDB文件缺失的问题,并提供了详细的解决方案。通过设置符号服务器路径可以获取完整的调用堆栈,包括Windows组件及API调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用 VS2010 在 Debug 模式下调试程序的时候经常会遇到如下的输出信息:

?
1
2
3
4
5
6
7
8
“abc.exe”: 已加载“C:\WINDOWS\system32\ntdll.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\kernel32.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\ws2_32.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\advapi32.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\rpcrt4.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\secur32.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\msvcrt.dll”,Cannot find or open the PDB file
“abc.exe”: 已加载“C:\WINDOWS\system32\ws2help.dll”,Cannot find or open the PDB file

这种信息算不上是真正的错误,具体如下,按照MS的Debugger的说法:

   “We apologize if these messages are confusing, but is there any functionality you are expecting that is not available in the debugger? The symbol files (.pdb's) that cannot be found are the symbol files for the Windows system .dll's, and the only reason that you would need these is if you are trying to obtain complete callstacks including the Windows components, or debug into the Windows system API's. If you need the symbols, they are available from the Microsoft Public Symbol servers by checking the "Microsoft Symbol Servers" box under symbol settings (Tools -> Options -> Debugging -> Symbols). 

 照做,把下面Temp的路径改到自己想要的地方,Debug(会比较慢),取消掉MS的那个Symbols,底下的路径不动。

现在只是会解决了,但这Symbols是什么还需学习。

恩,按照MS的说法:

To debug a crash that occurs during a call to a system DLL or to a third-party library, you will often need system .dbg or .pdb files, which contain symbols for Windows DLLs, EXEs, and device drivers .

现在还用不到,等以后再注意一下吧。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值