title: vscode - ofstream not creating a new file, .exe works normally
body: <p>I cannot create or read files using vscode with fstream. Program run from .exe works normally (creates a file empty.txt).
  main.cpp:</p>
  <pre><code>#include &lt;fstream&gt; 
  
  int main()
  {
      std::ofstream file(&quot;empty.txt&quot;);
  }
  </code></pre>
  <p>The above program does not create a file when run with vscode.</p>
  <ul>
  <li>Editor: Visual Studio Code</li>
  <li>Compiler: MinGW-w64 (MSYS2)</li>
  <li>System: Windows 10</li>
  </ul>
  <p>launch.json:</p>
  <pre><code>{
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;C/C++: 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;C:\\msys64\\mingw64\\bin&quot;,
              &quot;environment&quot;: [],
              &quot;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;miDebuggerPath&quot;: &quot;C:\\msys64\\mingw64\\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
                  },
                  {
                      &quot;description&quot;: &quot;Set Disassembly Flavor to Intel&quot;,
                      &quot;text&quot;: &quot;-gdb-set disassembly-flavor intel&quot;,
                      &quot;ignoreFailures&quot;: true
                  }
              ],
              &quot;preLaunchTask&quot;: &quot;C/C++: g++.exe build active file&quot;
          }
      ],
      &quot;version&quot;: &quot;2.0.0&quot;
  }
  </code></pre>
  <p>tasks.json:</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:\\msys64\\mingw64\\bin\\g++.exe&quot;,
              &quot;args&quot;: [
                  &quot;-fdiagnostics-color=always&quot;,
                  &quot;-g&quot;,
                  &quot;${fileDirname}\\**.cpp&quot;,
                  //&quot;${fileDirname}\\**.h&quot;,
                  //&quot;${file}&quot;,
                  &quot;-o&quot;,
                  &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;
              ],
              &quot;options&quot;: {
                  &quot;cwd&quot;: &quot;C:\\msys64\\mingw64\\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>