title: How do you configure visual studio code to run compiled Go code when using Run/Run&Debug (F5/CTRL+F5) VS code options?
body: <p>I have installed the following task to compile my Go project following this blog post: <a href="https://robertbasic.com/blog/build-and-run-golang-projects-in-vs-code/" rel="noreferrer">https://robertbasic.com/blog/build-and-run-golang-projects-in-vs-code/</a></p>
  <p><strong>tasks.json</strong>:</p>
  <pre><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      &quot;version&quot;: &quot;2.0.0&quot;,
      &quot;tasks&quot;: [
          {
              &quot;label&quot;: &quot;Build Go&quot;,
              &quot;type&quot;: &quot;shell&quot;,
              &quot;command&quot;: &quot;go build&quot;,
              &quot;group&quot;: {
                  &quot;kind&quot;: &quot;build&quot;,
                  &quot;isDefault&quot;: true
              }
          }
      ]
  }
  </code></pre>
  <p>Now I can compile the project using Terminal&gt;Run build task</p>
  <p>For running and debugging, I have created:</p>
  <p><strong>launch.json</strong>:</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
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
  
          {
              &quot;name&quot;: &quot;Launch&quot;,
              &quot;type&quot;: &quot;go&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;mode&quot;: &quot;auto&quot;,
              &quot;program&quot;: &quot;${fileDirname}&quot;,
              &quot;cwd&quot;: &quot;${workspaceRoot}&quot;,
              &quot;args&quot;: [],
              &quot;env&quot;: {}
          }
      ]
  }
  </code></pre>
  <p>But it does not work, I get the following message:</p>
  <pre><code>package .: no Go files in /usr/home/username/projects/my_app/.vscode
  Process exiting with code: 1 signal: false
  </code></pre>
  <p>Visual Studio Code under FreeBSD12.1 (probably not relevant).</p>
  <p>What do I have to do to get the program running when using F5/CTRL+F5?
  Any tip including recommended help section or blog entry is welcomed.</p>