Visual Studio 尚未为此文档加载任何符号

Visual Studio No Symbols have been loaded for this document(Visual Studio 尚未为此文档加载任何符号)

本文介绍了Visual Studio 尚未为此文档加载任何符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在调试 Visual Studio 2008 C++ 项目时遇到了一些问题.当我开始在调试中运行它时,断点被禁用,消息为

I am having some trouble debugging a visual studio 2008 C++ project. When I start running it in debug, the breakpoints are disabled with the message

断点不会被击中.没有为此加载任何符号文档.

The Breakpoint will not be hit. No Symbols have been loaded for this document.

我尝试过清理和重建,但这并没有什么区别.

I have tried cleaning and rebuilding, but this doesn't make a difference.

我也尝试查看调试->Windows->模块.如果我右键单击要调试的模块并按符号加载信息,它会显示它尝试从中加载符号的位置列表.列表中的第一个是正确的,文件存在,但旁边是这个错误

I also tried looking in Debug->Windows->Modules. If I right click on the module I am trying to debug and press Symbol load information it brings up a list of places it has tried to load the symbols from. The first in the list is correct and the file exists, but next to it is this error

C:path omysymbolDebugMyProject.pdb:未知符号处理程序错误

C:path omysymbolDebugMyProject.pdb: Unknown symbol handler for error

有谁知道这是什么原因造成的或如何解决它?

Does anyone know what causes this or how to fix it?

推荐答案

首先,有可能你的一些模块不会显示在模块窗口中,因为其中一些可能是动态加载的(仅在需要时).

First of all, it is possible that some of your modules won't show in the module window, because some of them may be loaded dynamically (only as needed).

您可能想要在链接器 > 下检查您的项目属性.调试生成程序数据库文件和生成调试信息.确保这两个设置正确.

You might want to check in your project properties under Linker > Debugging > Generate Program Database File and Generate Debug Info. Be sure these two are set properly.

另外,检查是否 C/C++ >一般>调试信息格式设置为用于编辑并继续的程序数据库 (/ZI) 或类似内容.

Also, check if C/C++ > General > Debug Information Format is set to Program Database for Edit And Continue (/ZI) or something similar.

我知道您提到过您的符号文件存在,但检查我刚刚提到的内容将确保您在正确的位置拥有正确版本的符号.

I know you mentioned that your symbol file exists, but checking what I just mentioned will ensure you have the right version of your symbol in the right place.

最后,检查您的解决方案中的所有项目和文件是否都设置为编译为 Debug 而不是 Release 或其他,因为不会为此项目/文件生成符号(因此不会加载任何符号).

Finally, check if all your project and files in your solution are set to compile as Debug and not Release or something else, because no symbols will be generated (hence none will be loaded) for this project / file.

希望这会有所帮助.

这篇关于Visual Studio 尚未为此文档加载任何符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Visual Studio 尚未为此文档加载任何符号