Open the file .vscode/launch.json (VS Code creates this automatically when you first run your C++ code with the debugger.)
.vscode/launch.json
Find the line that says: "console": "internalConsole"
"console": "internalConsole"
Change it to: "console": "integratedTerminal"
"console": "integratedTerminal"