title: How to enable pretty printing for C++ in Visual Studio Code?
body: <p>I am trying to enable pretty printing for C++ in Visual Studio Code using MinGW GDB python debugger.</p>
  <p>I followed steps described <a href="https://stackoverflow.com/questions/4985414/how-to-enable-gdb-pretty-printing-for-c-stl-objects-in-eclipse-cdt">here</a> under the <em>&quot;This is for MinGW users with Eclipse CDT&quot;</em> heading, but when I try to start the debugger with <code>&quot;externalConsole&quot;: true</code> I get the following logging output in the debug console:</p>
  <pre><code>1: (189) LaunchOptions{&quot;name&quot;:&quot;g++.exe - Build and debug active file&quot;,&quot;type&quot;:&quot;cppdbg&quot;,&quot;request&quot;:&quot;launch&quot;,&quot;program&quot;:&quot;c:\\Users\\Ben Wilson\\Documents\\Scripts\\CodingChallenges\\movie.exe&quot;,&quot;args&quot;:[],&quot;stopAtEntry&quot;:false,&quot;cwd&quot;:&quot;C:\\Users\\Ben Wilson\\Documents\\Scripts\\CodingChallenges&quot;,&quot;environment&quot;:[],&quot;externalConsole&quot;:true,&quot;MIMode&quot;:&quot;gdb&quot;,&quot;miDebuggerPath&quot;:&quot;C:\\MinGW\\bin\\gdb-python27.exe&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;:true}],&quot;preLaunchTask&quot;:&quot;C/C++: g++.exe build active file&quot;,&quot;logging&quot;:{&quot;engineLogging&quot;:true},&quot;__configurationTarget&quot;:5,&quot;__sessionId&quot;:&quot;c62bc9d3-8c55-4dfb-b413-c91d22f3232e&quot;}
  1: (315) Starting: &quot;C:\MinGW\bin\gdb-python27.exe&quot; --interpreter=mi -x &quot;C:\Users\Ben Wilson\Documents\Scripts\CodingChallenges\.gdbinit&quot;
  1: (328) DebuggerPid=11376
  1: (391) &quot;C:\MinGW\bin\gdb-python27.exe&quot; exited with code -1073741515 (0xC0000135).
  Starting: &quot;C:\MinGW\bin\gdb-python27.exe&quot; --interpreter=mi -x &quot;C:\Users\Ben Wilson\Documents\Scripts\CodingChallenges\.gdbinit&quot;
  &quot;C:\MinGW\bin\gdb-python27.exe&quot; exited with code -1073741515 (0xC0000135).
  
  1: (407) Send Event AD7MessageEvent
  1: (408) &lt;-logout
  </code></pre>
  <p>I tried setting <code>&quot;externalConsole&quot;: false</code>, and I get this output to the debug console:</p>
  <pre><code>1: (123) LaunchOptions{&quot;name&quot;:&quot;g++.exe - Build and debug active file&quot;,&quot;type&quot;:&quot;cppdbg&quot;,&quot;request&quot;:&quot;launch&quot;,&quot;program&quot;:&quot;c:\\Users\\Ben Wilson\\Documents\\Scripts\\CodingChallenges\\movie.exe&quot;,&quot;args&quot;:[],&quot;stopAtEntry&quot;:false,&quot;cwd&quot;:&quot;C:\\Users\\Ben Wilson\\Documents\\Scripts\\CodingChallenges&quot;,&quot;environment&quot;:[],&quot;externalConsole&quot;:false,&quot;MIMode&quot;:&quot;gdb&quot;,&quot;miDebuggerPath&quot;:&quot;C:\\MinGW\\bin\\gdb-python27.exe&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;:true}],&quot;preLaunchTask&quot;:&quot;C/C++: g++.exe build active file&quot;,&quot;logging&quot;:{&quot;engineLogging&quot;:true},&quot;__configurationTarget&quot;:5,&quot;__sessionId&quot;:&quot;cfbd8955-0807-495d-8bfa-e06052797523&quot;}
  1: (225) Wait for connection completion.
  </code></pre>
  <p><strong>launch.json</strong></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 - Build and debug active file&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;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;miDebuggerPath&quot;: &quot;C:\\MinGW\\bin\\gdb-python27.exe&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;: true
                  }
              ],
              &quot;preLaunchTask&quot;: &quot;C/C++: g++.exe build active file&quot;,
              &quot;logging&quot;: { &quot;engineLogging&quot;: true }
          }
      ]
  }
  </code></pre>
  <p><strong>tasks.json</strong></p>
  <pre><code>{
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;cppbuild&quot;,
              &quot;label&quot;: &quot;C/C++: g++.exe build active file&quot;,
              &quot;command&quot;: &quot;C:\\MinGW\\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;C:\\MinGW\\bin&quot;
              },
              &quot;problemMatcher&quot;: [
                  &quot;$gcc&quot;
              ],
              &quot;group&quot;: {
                  &quot;kind&quot;: &quot;build&quot;,
                  &quot;isDefault&quot;: true
              },
              &quot;detail&quot;: &quot;Task generated by Debugger.&quot;
          }
      ],
      &quot;version&quot;: &quot;2.0.0&quot;
  }
  </code></pre>
  <p>Also, running the gdb-python27 executable separately doesnt seem to do anything (unsure if this is expected behaviour)</p>
  <pre><code>C:\Users\Ben Wilson\Documents\Scripts\CodingChallenges&gt;C:\MinGW\bin\gdb-python27.exe
  
  C:\Users\Ben Wilson\Documents\Scripts\CodingChallenges&gt;
  </code></pre>
  <p>Has anyone experienced this before or know what to do here?</p>