title: Debug with F5 fails on VSCode saying "Unable to establish a connection to GDB"
body: <p>When I press F5 key to run a C++ program on Visual Studio Code, I get the message</p>
  <p><code>&quot;Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information.&quot;</code></p>
  <p>I use <code>g++.exe</code> and MinGW for compiling.
  Until an hour ago, the debugging with F5 key was done properly, and I've never touched <code>launch.json</code>. Could you tell me what is wrong?</p>
  <p>Below is the <code>launch.json</code></p>
  <pre><code>{
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;g++.exe - アクティブ ファイルのビルドとデバッグ&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceFolder}&quot;,
              &quot;environment&quot;: [],
              &quot;console&quot;: &quot;externalTerminal&quot;,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;miDebuggerPath&quot;: &quot;C:\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe&quot;,
              &quot;setupCommands&quot;: [
                  {
                      &quot;description&quot;: &quot;gdb の再フォーマットを有効にする&quot;,
                      &quot;text&quot;: &quot;-enable-pretty-printing&quot;,
                      &quot;ignoreFailures&quot;: true
                  }
              ],
              &quot;preLaunchTask&quot;: &quot;C/C++: g++.exe アクティブなファイルのビルド&quot;
          }
      ]
  }
  </code></pre>
  <p>Below is the <code>tasks.json</code></p>
  <pre><code>{
      &quot;version&quot;: &quot;2.0.0&quot;,
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;cppbuild&quot;,
              &quot;label&quot;: &quot;C/C++: g++.exe アクティブなファイルのビルド&quot;,
              &quot;command&quot;: &quot;C:\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe&quot;,
              &quot;args&quot;: [
                  &quot;-g&quot;,
                  &quot;${file}&quot;,
                  &quot;-o&quot;,
                  &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;
              ],
              &quot;options&quot;: {
                  &quot;cwd&quot;: &quot;${workspaceFolder}&quot;
              },
              &quot;problemMatcher&quot;: [
                  &quot;$gcc&quot;
              ],
              &quot;group&quot;: &quot;build&quot;,
              &quot;detail&quot;: &quot;コンパイラ: C:\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe&quot;
          },
          {
              &quot;type&quot;: &quot;cppbuild&quot;,
              &quot;label&quot;: &quot;C/C++: g++.exe アクティブなファイルのビルド ver(1)&quot;,
              &quot;command&quot;: &quot;C:\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe&quot;,
              &quot;args&quot;: [
                  &quot;-g&quot;,
                  &quot;${file}&quot;,
                  &quot;-o&quot;,
                  &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;
              ],
              &quot;options&quot;: {
                  &quot;cwd&quot;: &quot;${workspaceFolder}&quot;
              },
              &quot;problemMatcher&quot;: [
                  &quot;$gcc&quot;
              ],
              &quot;group&quot;: {
                  &quot;kind&quot;: &quot;build&quot;,
                  &quot;isDefault&quot;: true
              },
              &quot;detail&quot;: &quot;デバッガーによって生成されたタスク。&quot;
          }
      ]
  }
  </code></pre>
  <p>Below is the <code>c_cpp_properties.json</code></p>
  <pre><code>{
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;Win32&quot;,
              &quot;includePath&quot;: [
                  &quot;${workspaceFolder}/**&quot;,
                  &quot;${vcpkgRoot}/x86-windows-static/include&quot;,
                  &quot;C:\\Users\\SonicTheHedgehog\\Desktop\\include&quot;
              ],
              &quot;defines&quot;: [
                  &quot;_DEBUG&quot;,
                  &quot;UNICODE&quot;,
                  &quot;_UNICODE&quot;
              ],
              &quot;windowsSdkVersion&quot;: &quot;10.0.18362.0&quot;,
              &quot;compilerPath&quot;: &quot;C:\\mingw-w64\\x86_64-8.1.0-win32-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe&quot;,
              &quot;cStandard&quot;: &quot;c17&quot;,
              &quot;cppStandard&quot;: &quot;c++17&quot;,
              &quot;intelliSenseMode&quot;: &quot;gcc-x64&quot;
          }
      ],
      &quot;version&quot;: 4
  }
  </code></pre>
  <p>Addition:
  I found an error message on <code>launch.json</code></p>
  <p><code>Property console is not allowed</code></p>
  <p>and <code>console</code> is marked with wavy line.</p>