用windbg调试Release版本,查看source code窗口中的变量值,发现有些变量无法在windbg显示值,而提示 “Your debugger is not using the correct symbols...”,检查模块加载的pdb没有任何问题,加载了 正确的pdb,但就是有些变量的值显示不出来。之前用VS2005调试Release版本也出现过问题,能显示所有值,但显示的变量值是错误的。于是去掉 优化选项后重现编译模块。发现Windbg能正常显示变量值,不再提示 “Your debugger is not using the correct symbols...”。