Cannot find or open the PDB file问题的解决

参见:http://blog.chinaunix.net/uid-11765716-id-3074932.html


最近发现用VS2010编译的时候输出窗口总是有如下的类似信息:
  1. 'win32.exe': Loaded 'D:\程序设计\vs2010\win32\Debug\win32.exe', Symbols loaded.
  2. 'win32.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
  3. 'win32.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
  4. 'win32.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
  5. 'win32.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
  6. 'win32.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
  7. 'win32.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
  8. 'win32.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
  9. 'win32.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
  10. 'win32.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
  11. 'win32.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
  12. 'win32.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
  13. 'win32.exe': Loaded 'C:\Windows\System32\uxtheme.dll', Cannot find or open the PDB file
  14. 'win32.exe': Loaded 'C:\Windows\System32\dwmapi.dll', Cannot find or open the PDB file
  15. 'win32.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
  16. 'win32.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
  17. 'win32.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
  18. 'win32.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
  19. 'win32.exe': Loaded 'C:\Windows\System32\cryptbase.dll', Cannot find or open the PDB file
  20. 'win32.exe': Loaded 'C:\Windows\System32\clbcatq.dll', Cannot find or open the PDB file
  21. 'win32.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
  22. The program '[1700] win32.exe: Native' has exited with code 0 (0x0).

     网上搜了半天找到解决的办法:

打开VS2010:工具--》选项--》》调试--》符号
接下来就是选择Microsoft,然后确认

 接着随便编译一个程序,过程会灰常的慢。

  看到此目录下符号缓存了吗?C:\Users\kjqin\AppData\Local\Temp\SymbolCache 找到这个目录拷贝出来,找个地方存放。接下来就是去掉Microsoft符号服务器,要是不去,每次都要从Microsoft下载很麻烦,已经缓存了,我们就可以利用好这些缓存,至此完美解决。