title: VSCode : program 'SourceFolder/test' has exited with code 42 (0x0000002a)
body: <p>I'm trying to run from a launch.json file, so i can use gdb to debug my program in vscode.</p>
  <p>The launch.json:</p>
  <pre><code>{
    &quot;version&quot;: &quot;0.2.0&quot;,
    &quot;configurations&quot;: [
      {
        &quot;name&quot;: &quot;g++ build and debug active file&quot;,
        &quot;type&quot;: &quot;cppdbg&quot;,
        &quot;request&quot;: &quot;launch&quot;,
        &quot;program&quot;: &quot;SourceFolder/test&quot;,
        &quot;args&quot;: [],
        &quot;stopAtEntry&quot;: false,
        &quot;cwd&quot;: &quot;SourceFolder&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;: true
          }
        ],
        &quot;preLaunchTask&quot;: &quot;g++ compile active file&quot;,
        &quot;miDebuggerPath&quot;: &quot;/usr/bin/gdb&quot;
        }
      ]
  }
  </code></pre>
  <p>The path is correct, i can see the compiled file right there in the folder.
  I can run the program via console (bash) no problem and it doesn't throw any errors, but when i run it via this method i get the following pop up:</p>
  <pre><code>Unable to start debugging. Program path 'SourceFolder/test' is missing or invalid.
  
  GDB failed with message: SourceFolder/test: File or directory not found.
  
  ...
  </code></pre>
  <p>And the debug-terminal returns:</p>
  <pre><code>The program 'SourceFolder/test' has exited with code 42 (0x0000002a).
  </code></pre>
  <p>Could &quot;preLaunchTask&quot;: &quot;g++ compile active file&quot; be causing this error?</p>