[SOLVED] An Issue with Unverified Breakpoints

Currently my situation is that I am having trouble in terms of debugging within VS Code 2019. Not so much setting it up within the launch.json as I am with it working correctly, specifically with breakpoints.
(Note: It compiles normally)
Whenever I begin running the debugger, I am greeted with the normal intro message, and am allowed to give input, but after that I am given no response unless I stop debugging.

After I stop debugging it displays “Try 1: Enter your guess:”

Some key things to note is how the breakpoints I placed become unverified whenever I’m in debug mode, and as a result prevent me from actually gaining any useful input that I can use to fix my code.

As of this moment I am unsure how to fix this. If any of you all can give some input on how to deal with the problem, it would be highly appreciated. Here’s my explorer and launch.json configurations if that helps.

Strange I’m getting the same thing with the internal console. The external one works fine.

As for debugging you need to compile with /Zi for debug information.

Hey Dan, compiling the files with a /Zi ended up fixing the unverified breakpoint issue! All of the breakpoints are now verified! Thanks for that!

However, now I’m currently dealing with a new issue. Apparently the debugger is having some issues recognizing “BCGame” and getting to it. If I try to play it normally on say a terminal, the game runs fine, but it has issues the moment it reaches “PlayGame()”.

I’m not too sure as to why the debugger doesn’t recognize it. While the debugger can definitely see the breakpoints displayed in both the main.cpp and FBullCowGame.cpp files, it struggles with going forward after the introductory message. However, VS Code itself is not actually frozen, as I can definitely type stuff into the terminal and it immediately pops up. However, I still get no response otherwise.

The moment I stop the debugger, part of the beginning of PlayGame() would show up normally, but at that point I am unable to give any input through the terminal.

Normally how it plays out is that GetGuess() would show up before the player can give any input (and it works normally if I tried this within the VS code or dev terminal), but the debugger has issues with doing so. Any ideas on how to fix this? If it helps, here’s some new information as well. The launch.json and files are basically the same otherwise.

Yeah I’m not sure what’s going on with that. I assume it’s a bug with VS Code.
Change "externalConsole" to true and that should work.

Hey Dan, changing the externalConsole made it work too!! It’s probably a bug like you said, which is strange, but it’s working pretty fine right now! Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms