title: How to debug C# code using Visual Studio Code
body: <p>I am a newbie to VS Code environment. I am developing a Web API in VS Code which would later be consumed from client application. Following code block does not seem to be executing so I want to check whether it is at all hitting!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//GET: pwapi/plants/10076/features
  [HttpGet("{id}, {sectionArray}")]
  public async Task&lt;string&gt; Get(int id, string sectionArray){
    var url="https://www.domain.com/search?apikey=&lt;apikey&gt;&amp;sections="+sectionArray+"&amp;plantid="+id;
     
    using(var client = new HttpClient()){
      client.BaseAddress=new Uri(url);
      client.DefaultRequestHeaders.Accept.Clear();
      var response=await client.GetAsync(url);
      
      //will throw an exception if not successful
      response.EnsureSuccessStatusCode();
      
      string content = await response.Content.ReadAsStringAsync();
      
      //return await Task.Run(() =&gt; JsonObject.Parse(content));
      return content;
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>URL for the above method is <a href="http://localhost:5000/pwapi/plants/10076/features" rel="nofollow">http://localhost:5000/pwapi/plants/10076/features</a></p>
  
  <p>I have the overloaded method which is working fine:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[HttpGet("{id}")]
  public async Task&lt;string&gt; Get(int id){
    var url="https://www.domain.com/list?apikey=&lt;apikey&gt;";
    using(var client = new HttpClient()){
      client.BaseAddress=new Uri(url);
      client.DefaultRequestHeaders.Accept.Clear();
      var response=await client.GetAsync(url);
      
      //will throw an exception if not successful
      response.EnsureSuccessStatusCode();
      
      string content = await response.Content.ReadAsStringAsync();
      
      //return await Task.Run(() =&gt; JsonObject.Parse(content));
      return content;
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>URL for the above method is <code>http://localhost:5000/pwapi/plants/10076</code></p>
  
  <p>Three questions:
  1. How I can debug the code?
  2. If debug is not possible (so far I have seen that debug is possible for client scripts only, I may be wrong), what is the alternative way to know where I am doing wrong?
  3. If there is no alternative, please tell me why the method is not hitting.</p>