拙网论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 130|回复: 0

“The breakpoint will not currently be hit”

[复制链接]

949

主题

1001

帖子

3736

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
3736
发表于 2018-10-7 21:36:57 | 显示全部楼层 |阅读模式
https://stackoverflow.com/questions/27483273/the-breakpoint-will-not-currently-be-hit-and-i-cannot-add-the-pdb-file
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 .libfiles (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



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|抱朴守拙BBS

GMT+8, 2025-5-26 02:52 , Processed in 0.218539 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表