PolGraphic PolGraphic - 1 year ago 87
C++ Question

"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

mode, then run it in
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
file (after
clear, rebuild
) with
Debug -> Windows -> Modules
RMB -> Load symbols
was in
folder and
was in
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
files (but the debugging doesn't work even in

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

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

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
folder is being created each time I hit
mode, and so I get new
file also. I am running the application with
mode selected.

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

Answer Source

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


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download