title: Can't debug C++ in VS code with gdb
body: <p>I'm trying debugging C++ in Visual Studio Code, but here is something wrong.
  The debug status keeps scrolling, but no console shows. If I stop debug (shift+ F5), I won't be able to debug again. Whether click the green triangle or F5, nothing happens. <a href="https://i.stack.imgur.com/lbWq1.png" rel="nofollow noreferrer">Debug screenshot</a> <br></p>
  
  <p>Building is OK. It's just the debug problem.<br>
  MinGW has been added to PATH. I can use g++ or gdb in CMD.<br></p>
  
  <p>My environments:</p>
  
  <ul>
  <li>OS: Windows10 1803</li>
  <li>Visual Studio Code: 1.24.0</li>
  <li>C/C++ extension: 0.17.4</li>
  <li>MinGW_w64: x86_64-8.1.0-release-posix-seh-rt_v6-rev0</li>
  </ul>
  
  <p>Here are my configs:</p>
  
  <p>c_cpp_properties.json:</p>
  
  <pre><code>{
      "configurations": [
          {
              "name": "Win32",
              "includePath": [
                  "C:/MinGW/include",
                  "C:/MinGW/x86_64-w64-mingw32/include",
                  "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
                  "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
                  "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
                  "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/tr1",
                  "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
                  "${workspaceFolder}"
              ],
              "defines": [
                  "_DEBUG",
                  "UNICODE"
              ],
              "compilerPath": "C:/MinGW/bin/gcc.exe",
              "intelliSenseMode": "clang-x64",
              "browse": {
                  "path": [
                      "C:/MinGW/include",
                      "C:/MinGW/x86_64-w64-mingw32/include",
                      "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
                      "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
                      "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
                      "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/tr1",
                      "C:/MinGW/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
                      "${workspaceFolder}"
                  ],
                  "limitSymbolsToIncludedHeaders": true,
                  "databaseFilename": ""
              },
              "cStandard": "c11",
              "cppStandard": "c++17"
          }
      ],
      "version": 4
  }
  </code></pre>
  
  <p>launch.json:</p>
  
  <pre><code>{
      "version": "0.2.0",
      "configurations": [
          {
              "name": "(gdb) Launch",
              "preLaunchTask": "build",
              "type": "cppdbg",
              "request": "launch",
              "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
              "args": [],
              "stopAtEntry": false,
              "cwd": "${workspaceFolder}",
              "environment": [],
              "externalConsole": true,
              "MIMode": "gdb",
              "miDebuggerPath": "C:/MinGW/bin/gdb.exe",
              "setupCommands": [
                  {
                      "description": "Enable pretty-printing for gdb",
                      "text": "-enable-pretty-printing",
                      "ignoreFailures": true
                  }
              ]
          }]
  }
  </code></pre>
  
  <p>tasks.json</p>
  
  <pre><code>{
      "version": "2.0.0",
      "tasks": [
          {
              "label": "build",
              "type": "shell",
              "group": {
                  "kind": "build",
                  "isDefault": true
              },
              "presentation": {
                  "echo": true,
                  "reveal": "always",
                  "focus": false,
                  "panel": "shared"
              },
              "windows": {
                  "command": "g++",
                  "args": [
                      "-g",
                      "\"${file}\"",
                      "--std=c++11",
                      "-o",
                      "\"${fileDirname}\\${fileBasenameNoExtension}.exe\""
                  ]
              }
          }
      ]
  }
  </code></pre>
  
  <p>settings.json</p>
  
  <pre><code>{
      "files.associations": {
          "iostream": "cpp",
          "ostream": "cpp",
          "cmath": "cpp",
          "array": "cpp",
          "chrono": "cpp",
          "functional": "cpp",
          "ratio": "cpp",
          "tuple": "cpp",
          "type_traits": "cpp",
          "utility": "cpp",
          "future": "cpp",
          "streambuf": "cpp",
          "sstream": "cpp",
          "initializer_list": "cpp",
          "valarray": "cpp"
      }
  }
  </code></pre>