Describe the bug
To Reproduce
tasks.json:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Debug",
"type": "shell",
"command": "g++",
"args": [
"-g3",
"-O0",
"-std=c++17",
"main.cpp",
"-o",
"bin/pool.exe"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
C:\>g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Steps to reproduce the behavior:
A console windows appears, the program executes, and then the console window is immediately closed. How do I prevent it from closing? Alternatively, how do I run a program in such a way that output is redirected to the VS Code's output windows?
@mmatrosov There currently isn't a way to keep the window open except to set a breakpoint at the end of main() and then inspect the data.
We haven't implemented having output in the VSCode output window yet.
You can use "externalConsole": false in launch.json to have your output be directed to the integrated terminal.