title: How to stop Task running terminal to exit automatically after the program ends in visual studio code?
body: <p>I am a new c++ learner and using visual studio code as my IDE. As an example, a cpp file has the hello world program written in it. In VSC, I compile the cpp file with a task named <code>Build</code>( >Tasks: Run Build task), and run it using the task named <code>Run</code>( >Tasks: Run task). (tasks.json is given below)</p>
  
  <p>But when I <code>Run</code>, a new terminal named "Task - Run" starts, shows the output and immediately exits.(Its very hard to see what was the output.)</p>
  
  <p>Is there any command that I can put into the tasks.json file so that the program doesn't disappear after it ends? Or is there any other workaround?</p>
  
  <pre><code>//my tasks.json file
  
  {
  "version": "2.0.0",
  "tasks": [
      {
          "taskName": "Build",
          "type": "shell",
          "command": "g++",
          "args": [
              "main.cpp"
          ],
          "group": {
              "kind": "build",
              "isDefault": true
          },
          "problemMatcher": []
      },
      {
          "taskName": "Run",
          "type": "shell",
          "command": "./a.out",
          "problemMatcher": []
      }
  ]
  }
  </code></pre>