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


    网上收集到的相关解决办法:

    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处于版本控制之下,建议取消控制。

  • 相关阅读:
    vs 2005 下 逐阶 海量测试堆算法 记录 【永久更新】
    预备 归并排序 –from wikipedia 演示
    有关堆栈溢出(in vs 2005)的读书笔记堆栈中 申请大数组
    Heapsort 代码 学习笔记 阳春三月版
    那些基础算法的 数学不等式 @快排分划 @kmp覆盖函数
    珠儿 快排 三月版本(主题:学代码,撘框架)(永久更新)
    c 语言格式输出 浮点数 不要用 整形输出 教训
    修改 堆栈大小 普适性方案总结 (跨平台 windows linux 栈设置大小)
    转tip 在VC下编译使用unistd.h,times.h等文件
    DB2用命令窗口连接数据库
  • 原文地址:https://www.cnblogs.com/ericsun/p/2596772.html
Copyright © 2020-2023  润新知