title: No symbol table loaded. Use the "file" command. [C++, Bazel, windows 10, vscode]
body: <p>I get </p>
  
  <blockquote>
    <p>No symbol table loaded.  Use the "file" command.
    When I run gdb <code>main.exe</code></p>
  </blockquote>
  
  <p>I m trying to debug the most simple programme with c++ you can imagine. and I can't debugged, after I <strong>used the Bazel as my build system</strong>.</p>
  
  <h2>src/app.main.cpp</h2>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      int a = 3;
      int b = 5;
      int c = a + b;
  
      /* code */
      std::cout &lt;&lt; "Hello world" &lt;&lt; std::endl;
      std::cout &lt;&lt; c &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>to build the binary, I run:</p>
  
  <blockquote>
    <p>bazel build //src/app:main --run_under=gdb</p>
  </blockquote>
  
  <p>Then I run:</p>
  
  <blockquote>
    <p>gdb main.exe</p>
  </blockquote>
  
  <p>and I get this output</p>
  
  <pre><code>Windows PowerShell
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  PS C:\dev\tests\cpp_tests\bazel-tests\bazel-bin\src\app&gt; gdb main.exe
  GNU gdb (GDB) 7.6.1
  Copyright (C) 2013 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 "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  &lt;http://www.gnu.org/software/gdb/bugs/&gt;...
  "C:\dev\tests\cpp_tests\bazel-tests\bazel-bin\src\app/main.exe": not in executable format: File format not recognized
  (gdb) start
  No symbol table loaded.  Use the "file" command.
  (gdb)
  </code></pre>
  
  <p>If I run:</p>
  
  <blockquote>
    <p><code>./main.exe</code></p>
  </blockquote>
  
  <p>I get</p>
  
  <pre><code>PS C:\dev\tests\cpp_tests\bazel-tests\bazel-bin\src\app&gt; ./main.exe
  Hello world
  8
  PS C:\dev\tests\cpp_tests\bazel-tests\bazel-bin\src\app&gt;
  </code></pre>
  
  <p>What is happening with Bazel?</p>