“断点当前不会被击中” - 我无法添加.pdb文件 [英] "The breakpoint will not currently be hit" - and I cannot add the .pdb file

查看:236
本文介绍了“断点当前不会被击中” - 我无法添加.pdb文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2013(Visual C ++)中有一个项目的解决方案。



但是当我在 debug mode,然后调试 模式下运行它:


目前不会打破断点。没有符号已经加载
为这个文件。


我正在尝试以类似的方式修复人们建议Visual C#修正;断点当前不会受到打击。没有为此文档加载任何符号。



不幸的是, none 有效:




  • clean&重建解决方案(也包括手动删除的临时文件),

  • solution - >属性 - >启动项目 - >启动项目 - >开始动作

  • 调试/常规设置 - >取消选中

  • 退出VC ++,重新加载,重新启动PC。



然后,我尝试选择 .pdb 文件(之后清除,重建)与调试 - > Windows - >模块 RMB - >加载符号 v120.pdb / Solution / Debug 文件夹和 .exe / Bin 文件夹中。我选择了它,我收到一条错误消息:


此文件夹中找不到匹配的符号文件。


我还能做什么?哪些解决方案/项目选项可能会影响调试?我建立一个 x86 .exe 项目,其中包括我的一些 .lib 文件(但调试不起作用在 main.cpp )。






附加信息请求的用户评论):



我看到在调试 - > Windows - > Project.exe F:... exe N / AN / A二进制文件未构建调试信息。 1 12/15/2014 12:31 PM 00BA0000-00E9C000 [3504] Project.exe


这很奇怪,因为解决方案/调试文件夹正在在调试模式下,每次点击重建 时创建,所以我得到新的 .pdb 文件也。我正在运行应用程序,选择 Debug 模式。






价值项目 - >属性 - > C / C ++ - >一般 - >调试信息格式编辑和继续程序数据库(/ ZI)

解决方案

看起来你没有正确地生成调试信息,这是模块窗口告诉你的。确保设置以下属性:



项目 - >属性 - > C / C ++ - >一般 - >调试信息格式





项目 - > ;属性 - >链接器 - >调试 - >生成调试信息。



有时可能会意外地更改。



除非您有自定义的构建解决方案,否则我们从未看到这些信息丢失了,但没有一个很好的理由,


I have a solution with one project in Visual Studio 2013 (Visual C++).

But when I build it in debug mode, then run it in debug mode I get:

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

I was trying to fix it in analogical way to what people suggested for Visual C# Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."

Unfortunately, none of that worked:

  • clean & rebuild solution (also with manually deleted temporary files),
  • solution -> Properties -> Startup Project -> startup projects -> Start action,
  • Debug/General settings -> uncheck Just My Code,
  • quit VC++, reload, restart PC.

Then I've tried to select the .pdb file (after clear, rebuild) with Debug -> Windows -> Modules and RMB -> Load symbols. v120.pdb was in /Solution/Debug folder and .exe was in /Bin folder. I've chosen it and I got an error message:

A matching symbol file was not found in this folder.

What else can I do? Which solution/project options may have affected debugging? I build an x86 .exe project that include some of my .lib files (but the debugging doesn't work even in main.cpp).


Additional information (some were requested by users in comments):

I see that under Debug -> Windows -> Modules there is such entry for my .exe:

Project.exe F:...exe N/A N/A Binary was not built with debug information. 1 12/15/2014 12:31 PM 00BA0000-00E9C000 [3504] Project.exe

That's quite strange because the Solution/Debug folder is being created each time I hit Rebuild for Debug mode, and so I get new .pdb file also. I am running the application with Debug mode selected.


The value of Project -> Properties -> C/C++ -> General -> Debug Information Format is Program Database for Edit And Continue (/ZI).

解决方案

It looks like you're not properly generating debug information which is what the modules window is telling you. Make sure that the following properties are both set up:

Project -> Properties -> C/C++ -> General -> Debug Information Format

and

Project -> Properties -> Linker -> Debugging -> Generate Debug Information.

These can sometimes get change accidentally.

I've never seen this information get lost without a good cause though unless you've got a custom build solution

这篇关于“断点当前不会被击中” - 我无法添加.pdb文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆