title: how to debug golang cobra cli app in vscode
body: <p>I have a golang cobra cli app. have configured my vscode for debugging. I want to debug a specific command using vscode for my application.</p>
  <p>I am using this launch.json</p>
  <pre><code>        {
              &quot;name&quot;: &quot;Launch Package&quot;,
              &quot;type&quot;: &quot;go&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;mode&quot;: &quot;debug&quot;,
              &quot;program&quot;: &quot;${fileDirname}&quot;
          }
  </code></pre>
  <p>If I select main.go and start debugging it just prints the help for my command. How can I debug a particular cli subcommand in vscode? Like say abc create or abc version</p>
  <p>If I select a subcommand package and then debug it says : Failed to launch :could not launch process:not an executalbe file</p>