title: Go Debugging with VS Code does not work. No variables, Call Stack etc
body: <p>I want to use VSCode with WSL for development.
  I have problems debugging my Go applications and I don't know why. I dont see the things in the call stack, no variables and also the buttons to jumping from breakpoint to breakpoint are greyed out. My DEBUG Console log is clean, no erros (see details below) I try to follow these articles to set up my environment:</p>
  
  <p><a href="https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension" rel="nofollow noreferrer">https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension</a>
  <a href="https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code" rel="nofollow noreferrer">https://github.com/Microsoft/vscode-go/wiki/Debugging-Go-code-using-VS-Code</a></p>
  
  <p>So what I do in detail:</p>
  
  <p>First I tell VSCode to set my GOPATH dynamacly from the current Workspace and also seperate the GooTools Installation from my GOPATH via go.toolsGopath. My settings.json looks like this:</p>
  
  <pre><code>{
      "go.inferGopath": true,
      "go.toolsGopath": "/mnt/c/Users/cloudnaut/gospace/gotools",
  }
  </code></pre>
  
  <p>So my GoTools are installed to /mnt/c/Users/cloudnaut/gospace/gotools. I have installed also the dlv debugger. Also  My working directory for go is instead <code>/mnt/c/Users/cloudnaut/gospace/go</code></p>
  
  <p>It haves the common go project structure:</p>
  
  <pre><code>.
  ├── bin
  ├── pkg
  └── src
      └── github.com
          └── cloudnaut
              └── project1
                  └── main.go
  </code></pre>
  
  <p>Everything seems fine. <code>Go:Install/Update Tools</code> are installed in my separate path. And my GOPATH structure also works. I use <code>GO:Current GOPATH</code> it shows my the correct GOPATH i want and <code>go install</code> also creates the go binary from my main.go in /bin. Perfect ...</p>
  
  <p>Now I want to start to debbuging. I just use a simple launch.json file directly point to my main.go</p>
  
  <pre><code>{
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      "version": "0.2.0",
      "configurations": [
          {
              "name": "Launch",
              "showLog": true,
              "type": "go",
              "request": "launch",
              "mode": "auto",
              "program": "/mnt/c/Users/cloudnaut/gospace/go/src/github.com/cloudnaut/project1/main.go",
              "env": {},
              "args": []
          }
      ]
  }
  </code></pre>
  
  <p>So and when I start now the debugging (breakpoints are set and shown under BREAKPOINTS) he creates in the folder a <code>__debug_bin</code>. But in my vscode debuger interface, I see no variables and stacktrace. The Problem is, I see also now errors or something. My Debug Console with the <code>showLog: true</code> option is nearly clean. It only contains the following lines:</p>
  
  <pre><code>API server listening at: 127.0.0.1:34477
  2019-12-19T13:55:52+01:00 info layer=debugger launching process with args: [/mnt/c/Users/cloudnaut/gospace/go/src/github.com/cloudnaut/project1/__debug_bin]
  </code></pre>
  
  <p>Nothing else. The "step over/step info/Step out" buttons from the debugger are greyed out. I only can press pause, restart and stop.</p>
  
  <p>See:</p>
  
  <p><a href="https://i.stack.imgur.com/eUZJB.jpg" rel="nofollow noreferrer">Picture VS Code Debugger Problem</a></p>