I have VS Code setup for running C/C++ code using the code runner extension, and everything runs pretty smoothly except for debugging. When I debug the program, the code gets compiled with the built-in build task and not code-runner, and the resulting output is shown in a separate console window, which is frustrating to work with when debugging, due to the active window focus issues. I want the output to show up in the integrated terminal in VS Code, just like it does during normal compilation using code-runner. Other answers on Stack Overflow suggest to include this in the launch.json file:
"console": "integratedTerminal"
,
but this piece of code seems to be outdated and unsupported in the current version of VS Code. Instead, looking at the IntelliSense suggestion, I tried including this in the launch.json file:
"externalConsole": false"
.
This does stop the external console from opening, although the integrated console does not show any output either, and now I'm left clueless as to where to view the output.
So how do I get the output while debugging to show up on the integrated console?