title: Visual studio code with cmake on Windows, how to set compiler and debug configuration
body: <p>I have Windows 7 with few different versions of Visual Studio and MinGW. When I create a cmake project and open it in Visual Studio Code it get configured automatically to use Visual Studio 14 compiler, I also have Visual Studio 17 and 19 installed, version 17 have <code>&quot;Desktop development with C++&quot; workload.</code> installed.</p>
  <p>I would like to know how to set which compiler to use when running initial configuration (when build folder is empty) and how to create a debug configuration. When I run plain debug button that do not require the configuration the break point do not trigger.</p>
  <p>I have tried with these config files in launch.json</p>
  <pre><code>&quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;(gdb) Launch&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${command:cmake.launchTargetPath}&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${fileDirname}&quot;,
              &quot;environment&quot;: [],
              &quot;env&quot;: {
                  &quot;Path&quot;: &quot;${env:Path};D:\\Installation\\oracClient 19\\instantclient_19_14\\&quot; 
              },
              &quot;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;miDebuggerPath&quot;: &quot;c:\\Users\\marko.grujic.CHIP\\.vscode\\extensions\\ms-vscode.cpptools-1.8.4\\debugAdapters\\bin\\WindowsDebugLauncher.exe&quot;,
              &quot;logging&quot;: {
                  &quot;engineLogging&quot;: true
              },
              &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;name&quot;: &quot;(Windows) Launch&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${command:cmake.launchTargetPath}&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceRoot}&quot;,
              &quot;environment&quot;: [],
              &quot;env&quot;: {
                  &quot;Path&quot;: &quot;${env:Path};D:\\Installation\\oracClient 19\\instantclient_19_14\\&quot; 
              },
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;miDebuggerPath&quot;: &quot;C:\\msys64\\mingw64\\bin\\gdb.exe&quot;,
              &quot;logging&quot;: {
                  &quot;engineLogging&quot;: true
              },
              &quot;console&quot;: &quot;externalTerminal&quot;
          }
      ]
  </code></pre>
  <p>Non of these work, <code>(gdb) Launch</code> config do not work because the code was compiled with Visual Studio compiler and I am trying to use MinGW debugger (This is assumption).
  <code>(Windows) Launch</code> also do not work but I have no idea why, it does run indefinitely but none of breakpoints work.</p>