c++mfcremote-debuggingwindows-7-x64

Why setting breakpoints in VS2010 doesn't work?


I don't know why setting breakpoints cannot work.

  1. Tried to disable the optimization and setting to C7 compatible Debug information Format.
  2. Cleaning and rebuilding the solution didn't work too.
  3. Deleted all PDB's EXE's manually in order to rebuild the solution again.
  4. Rebooting and hence launching again VS 2010 is not working.
  5. In some cases, the breakpoints are set but cannot be hit. The following is displayed in time of direct cursor of mouse at:

The breakpoint will not be currently hit. No executable code is not associated with this line. possible causes include: preprocessor directives or compiler linker optimizations.

Cannot set a breakpoint int the inner if-else block

Is set but cannot be hit


Solution

  • It is just equality check statement (== ) without any effects at the line of interest. Probably no code is generated for it even in debug mode.