title: Debug C app using visual studio code and Vagrant runnig ubuntu
body: <p>I boot up ubuntu using Vagrant to compile some C code, now i like to debug this code using
  Visual Studio Code.<br />
  How can i setup some kind of remote debug where the compiler and source code and all on the Ubuntu VM<br />
  And I only using VSCode from windows?<br />
  PS.<br />
  This used to work very well with windows WSL linux .<br />
  But now i like to achieve the same result with Ubuntu using Vagrant ( using Virtual Box ).
  Can it be done?
  <strong>UPDATE</strong>
  I tried as suggested but I'm getting error :</p>
  <p>my virtual box config from vscode :</p>
  <pre><code>Host 127.0.0.1:2222
    HostName 127.0.0.1:2222
    IdentityFile c:/HashiCorp/ubuntu-20.04/.vagrant/machines/default/virtualbox/private_key
    User vagrant
  </code></pre>
  <p>The error :</p>
  <pre><code>[13:27:45.945] &quot;install&quot; terminal command done
  [13:27:45.945] Install terminal quit with output: The process tried to write to a nonexistent pipe.
  [13:27:45.945] Received install output: The process tried to write to a nonexistent pipe.
  [13:27:45.950] Resolver error: Error: The process tried to write to a nonexistent pipe
      at Function.Offline (c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:64330)
      at c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:59961
      at Object.t.handleInstallOutput (c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:60339)
      at I (c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:311112)
      at processTicksAndRejections (internal/process/task_queues.js:94:5)
      at async c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:309029
      at async Object.t.withShowDetailsEvent (c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:403706)
      at async Object.t.resolve (c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:1:312426)
      at async c:\Users\foo\.vscode\extensions\ms-vscode-remote.remote-ssh-0.62.0\out\extension.js:127:110280
  [13:27:45.954] ------
  </code></pre>