title: Application Insights when in debug mode
body: <p>I've just enabled Application Insights in my MVC application and noticed that when debugging locally, that the trace information is being captured within my Azure Application Insight.</p>
  
  <p>When in debug mode, I want to stop my app from recording the events within my Azure Application Insight but still display the Events and logging information in the Diagnostic Tools > Events window within Visual Studio.</p>
  
  <p>I've tried the following and whilst this stop the events from being captured in my Azure AI, Visual Studio no longer displays the debug information in Events window.</p>
  
  <pre><code> protected void Application_Start()
   {
          #if DEBUG
          TelemetryConfiguration.Active.DisableTelemetry = true;
          #endif
   }
  </code></pre>
  
  <p>I've surfed the net for an answer to no avail. Hope someone can help.</p>