Search code examples
c++debuggingvisual-studio-2022sfml

The breakpoint will not currently be hit no executable code of the debugger's target code type is associated with this line


I honestly am at a loss here, I have never experience debugger behavior like this before and I don't believe I am experience enough to understand the solutions I have found in other questions.

Basically, I have similar code that works fine in another area of my program but here it is essentially skipping the if statements giving the warning listed in the title.

I thought it might be event.joyStickButton.button that was causing it, but it acts the same when I just put it as button in the second if statement. Additionally, it is fine in the following print statement. What is going on here?

image of code with various breakpoints set some normal others giving a warning


Solution

  • For this issue, i have the following suggestions to troubleshoot:

    1.Navigate to Tools=>Options=>Debugging=>General and check Suppress JIT optimization on module load.

    2.Right click project node and select Properties->C/C++->Optimization then set Optimization to "Disabled (/Od)".

    3.I have found this old ticket, you can check this option Check for consistent line endings on load by going to Tools > Options > Environment > Documents and unselect "Check for consistent line endings on load.