title: Confused by vscode delve debugger
body: <p>I have searched everywhere and tried what I can, but debugging go exes in VSCODE is just acting really weird for me.</p>
  
  <p>If I step through code, the debugger seems to jump around all over the place sometimes, as though I was switching threads. Most of the time if I hover over variables nothing happens. If I try to add them as watches I just get "unavailable". I am building and running from within the IDE.</p>
  
  <p>I have the latest version of go and delve. I see that I should be avoiding compiler optimisations with some gcflags settings, but nothing doing. No idea how to make progress. Any clues?</p>
  
  <hr>
  
  <p>UPDATE: After all, this was simply a typo in the build task used by VSCODE. The problem indeed was compiler optimisations, which needed to be disabled using the following exact syntax:</p>
  
  <pre><code>{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
      {
          "label": "Make Prog",
          "type": "shell",
          "command": "go",
          "args": [
              "install",
              "-gcflags",
              "-N -l",
              "./..."
          ],
          "group": {
              "kind": "build",
              "isDefault": true
          },
  
  
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>Relevant too is that I am using "exec", not "debug", to debug the executable.</p>