the breakpoint will not currently be hit

Flaviu_ 911 Reputation points
2021-03-02T17:24:44.73+00:00

I am trying to debug a MFC app, and when I put a breakpoint inside of my code, I got:

the breakpoint will not currently be hit no symbols have been loaded for this document

Of course, I am aware to have pdb file just near by my exe, and I have checked/unchecked "Enable Just My Code", and other options, none of them had worked. Why ? What else should I check in order to have my breakpoints as functional ?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,540 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Barrnet Zhou-MSFT 171 Reputation points
    2021-03-03T02:58:40.807+00:00

    First, I suggest that you could clean the project and rebuild the project. Delete all pdb files in the program directory.

    If it doesn't work, you could select Debug -> Windows -> Modules. You'll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You'll get a dialog that lists all the directories where it looked for the .pdb file for the assembly. Verify that list against the actual .pdb location. Make sure it doesn't find an old one. In normal projects, the assembly and its .pdb file should always have been copied by the IDE into the same folder as your .exe, i.e. the bin\Debug folder of your project.

    Besides, Make sure you are debugging in Debug mode and the project settings are x86 or x64.

    2 people found this answer helpful.

  2. Vikas Lalwani 6 Reputation points
    2021-10-14T08:39:36.88+00:00

    For C# based solution, I had to select "IIS", right-click on it and close it, clean solution, and then try to restart debugging it again, it worked.

    There are more ways here : Solving error "the breakpoint will not currently be hit" in Visual studio ( Multiple ways)
    Hope it helps

    1 person found this answer helpful.

  3. Flaviu_ 911 Reputation points
    2021-03-03T11:21:16.52+00:00

    I have tried:

    73786-image.png

    Why ?


  4. RLWA32 40,756 Reputation points
    2021-10-14T08:59:31.48+00:00

    I see that an error message "PDB Symbol reader could not be loaded " is present. According to this SO thread about VS2017 pdb-symbol-reader-could-not-be-loaded a repair or reinstall of VS2017 resolved the problem.

    0 comments No comments