I get an error that prevents me from setting a breakpoint in Visual Studio c++ project: "No executable code of the debugger's target code type is associated with this line."

M3 116 Reputation points
2023-12-01T18:47:02+00:00

I have a large c++ project that for some unknown reason has started to invalidate breakpoints that were previously working. The error message is:

User's image

When it happens, the debugger invalidates all breakpoints for entire classes at a time. Calls to functions outside the class can still contain valid breakpoints.

optimization is disabled /Od, the symbol database is created using /Zi (or /ZI) and the linker is using /DEBUG:FULL

I've cleaned and rebuilt the solution. I've manually deleted all temporary files and rebuilt. I've repaired the installation of Visual Studio, and of course I've tried turning it off and then turning it back on again. I'm out of idea? any suggestions?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,849 questions
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,622 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
965 questions
{count} votes