title: Cygwin GDB and VSCode
body: <p>Trying to debug an executable in VS Code over Cygwin's version of GDB (9.2).</p>
  <p>The executable comes from Free Pascal, Win32-x86. It has GDB compatible DWARF debug symbols. Standalone GDB under Cygwin can open the exe and run it, no problem. I can sort of work it with Cygwin/DDD over GDB, even though DDD is rather buggy.</p>
  <p>I'm trying to do the same from Visual Studio Code. The launch.json goes:</p>
  <pre><code>{
          &quot;name&quot;: &quot;(gdb) Launch&quot;,
          &quot;type&quot;: &quot;cppdbg&quot;,
          &quot;request&quot;: &quot;launch&quot;,
          &quot;program&quot;: &quot;E:\\Path\\MyProgram.exe&quot;,
          &quot;args&quot;: [&quot;-x&quot;],
          &quot;stopAtEntry&quot;: false,
          &quot;cwd&quot;: &quot;E:\\Path&quot;,
          &quot;environment&quot;: [],
          &quot;MIMode&quot;: &quot;gdb&quot;,
          &quot;miDebuggerPath&quot;: &quot;c:\\cygwin64\\bin\\gdb.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
              }
          ]
      }
  </code></pre>
  <p>When I try to launch, the command line in the terminal window goes:</p>
  <p><code>c:\Users\Seva\.vscode\extensions\ms-vscode.cpptools-1.2.1\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-w2bqan2m.tt2' '--stdout=Microsoft-MIEngine-Out-nagviahg.1gf' '--stderr=Microsoft-MIEngine-Error-udor1kbz.iot' '--pid=Microsoft-MIEngine-Pid-lhapkzkd.orq' '--dbgExe=c:\cygwin64\bin\gdb.exe' '--interpreter=mi'</code></p>
  <p>but then the progress bar over the left pane keeps going forever, as if the debugging server won't start or won't connect properly. The program itself is supposed to run and terminate rather quickly; this is clearly not happening.</p>
  <p>What am I missing?</p>
  <p>LATE EDIT: The PATH trick helped, but it looks like debug symbol loading and parsing is being done in VSCode, not by GDB. PDB symbols (for a dependent DLL) are loaded, DWARF ones aren't. Oh well, it was worth a try.</p>