您的位置:首页 > 其它

Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document

2012-07-18 09:14 531 查看
网上收集到的相关解决办法:

1st

Start debugging. Now select Debug->Windows->Modules. In the
modules window taht now appears, check what the Symbol Status reads. If
it reads "Symbols not loaded", then right click on that row, Load
Symbols and select the corresponding pdb file.

If the Symbol Status reads "binary was not built with debug info", you have not built your project with debug information.

To do this:

1) Goto Project->Properties

2) Make sure "Configuration" at the top is "Debug"

3) On the left, select "C/C++", then "General"

4) On the right, change "Debug information format" to "Program Database for edit and continue (/ZI)"

5) On the left, Select "Optimization"

6) On the right, Change "Optimization" to "Disabled (/Od)"

7) On the left, select "Code Generation"

8) On the right, change "Runtime library" to "Multi-Threaded Debug (/MTd)"

9) On the left, expand "Linker" and select "Debugging"

10) On the right, change "Generate Debug info" to "Yes (/DEBUG)"

11) Rebuild your project.

Spent a day working this out.. googling always helps !!! A big thanks to these forums.

2nd

Steps taken / other info:

1). tried rebuilding the application many times

2). tried completely deleting and redoing it from scratch

3). the .pdb file is in the same location as the DLL with the same name and time

4). my project is running on the debug version of the DLL and associated files

5). ensured there was only one instance of the DLL, project, etc. on the machine

6). right clicked on a DLL that is
within the Modules window, selected Symbol Settings, selected Debugging |
Symbols and manually added the directory with the .pdb file - even
though I confirmed that this is the default location used by the project

7). checked that Enable Just My Code is not selected within the Symbol Settings | Debugging | General menu

8). tried placing the DLL in the C:\Windows32\ directory just to see if the Modules Window would "see" it

9). tried adjusting a few other things to match suggestions regarding optimization settings, etc.

10). tried selecting Load DLL exports
within within the Symbol Settings | Debugging | Native menu (although I
am not familiar with what this may actually be doing); this caused most
of the DLL's in the Modules window to have a listing of Exports
Loaded, but did not appear to affect my issue in any way - again my DLL
is not within the Modules window

另外, 试试tools--> attatch to process.

如果还不行,那可能就是调用这个DLL的主程序的问题了

如果attatcha进行调试时候,发现不是实心点,说明你没有挂上,不能debug,此时解决方法如下。

1.删除站点bin目录下所有pdb文件,

2.选择vs的 Tools->options->Debugging->Symbols,将你的编译目录添加进去。

3.选择vs的Tools. Options,Debug, General,And uncheck: "Enable Just My Code."

4.如果这些dll处于版本控制之下,建议取消控制。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐