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

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

“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 .

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


你可能感兴趣的:(C++,debug,pdb,VS2010)