title: GDB in Visual Studio Code doesn't show printf() output to stdout
body: <p>When debugging a C project in VSCode with GDB, the output to stdout (through printf()) does not appear on the Debug Console. When using <code>cppvsdebug</code>, however, it works.</p>
  <p>This is my launch.json:</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;Debug&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${workspaceFolder}/${fileBasenameNoExtension}&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceFolder}&quot;,
              &quot;environment&quot;: [],
              &quot;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;setupCommands&quot;: [
                {
                  &quot;description&quot;: &quot;Enable pretty-printing for gdb&quot;,
                  &quot;text&quot;: &quot;-enable-pretty-printing&quot;,
                  &quot;ignoreFailures&quot;: false
                }
              ],
              &quot;windows&quot;: {
                &quot;miDebuggerPath&quot;: &quot;C:/raylib/mingw/bin/gdb.exe&quot;,
              },
              &quot;osx&quot;: {
                &quot;MIMode&quot;: &quot;lldb&quot;
              },
              &quot;linux&quot;: {
                &quot;miDebuggerPath&quot;: &quot;/usr/bin/gdb&quot;,
              },
              &quot;preLaunchTask&quot;: &quot;build debug&quot;
            },
            {
              &quot;name&quot;: &quot;Run&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceFolder}&quot;,
              &quot;environment&quot;: [],
              &quot;externalConsole&quot;: false,
              &quot;program&quot;: &quot;${workspaceFolder}/main&quot;,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;windows&quot;: {
                &quot;program&quot;: &quot;${workspaceFolder}/main.exe&quot;,
                &quot;miDebuggerPath&quot;: &quot;C:/raylib/mingw/bin/gdb.exe&quot;
              },
              &quot;osx&quot;: {
                &quot;MIMode&quot;: &quot;lldb&quot;
              },
              &quot;linux&quot;: {
                &quot;miDebuggerPath&quot;: &quot;/usr/bin/gdb&quot;
              },
              &quot;preLaunchTask&quot;: &quot;build release&quot;,
            }
          ]
        }
  
  </code></pre>
  <p>This is the command that is executed to run the debug session (according to the terminal window):</p>
  <pre><code>'c:\Users\...\.vscode\extensions\ms-vscode.cpptools-0.27.1\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-2dvbqvix.1cb' '--stdout=Microsoft-MIEngine-Out-1m5j1iy0.ufe' '--stderr=Microsoft-MIEngine-Error-oqyothgz.h5l' '--pid=Microsoft-MIEngine-Pid-hal3wx4b.uld' '--dbgExe=C:/raylib/mingw/bin/gdb.exe' '--interpreter=mi'
  </code></pre>
  <p>The Debug Console shows the &quot;splash screen&quot; info of GDB, but doesn't display any of the output from the printf() statements in my code:</p>
  <pre><code>=thread-group-added,id=&quot;i1&quot;
  GNU gdb (GDB) 8.1
  Copyright (C) 2018 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
  and &quot;show warranty&quot; for details.
  This GDB was configured as &quot;i686-w64-mingw32&quot;.
  Type &quot;show configuration&quot; for configuration details.
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;.
  Find the GDB manual and other documentation resources online at:
  &lt;http://www.gnu.org/software/gdb/documentation/&gt;.
  For help, type &quot;help&quot;.
  Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;.
  Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
  =cmd-param-changed,param=&quot;pagination&quot;,value=&quot;off&quot;
  [New Thread 9488.0x54dc]
  [New Thread 9488.0x577c]
  [New Thread 9488.0xff4]
  [New Thread 9488.0x4918]
  </code></pre>
  <p>When I run the Exe file with GDB from the commandline (Git Bash), all the output is displayed normally.</p>
  <p>Setting <code>externalConsole</code> to true doesn't work (it also doesn't open an external console to begin with).</p>
  <p>I'm on Windows 10.</p>
  <p>Is there any specific setting I need to adjust for this to work?</p>