title: How do I debug Azure EventHubs?
body: <p>I am trying to send data to an azure event hub later to be consumed by stream analytics and PowerBI.</p>
  
  <p>My C# application is sending a simple test string (JSON formatted) while I am testing the Event Hub, but when I want to process the data in the event hub it tells me no data has been sent.</p>
  
  <p>I am unsure how to debug the hub to see why the message does not show up, I tried google for a debug document but found none when searching for debugging azure event hubs</p>
  
  <p>How can I find any error messages about this?</p>
  
  <p>My C# code is simplified like this for testing purposes</p>
  
  <pre><code>private async Task SendMessageToEventHub(string messageToSend)
  {
      var connectionStringBuilder = new EventHubsConnectionStringBuilder(EventHubConnectionString)
      {
          EntityPath = EventHubName
      };
  
      eventHubClient = EventHubClient.CreateFromConnectionString(connectionStringBuilder.ToString());
  
      try
      {
          await eventHubClient.SendAsync(new EventData(Encoding.UTF8.GetBytes(messageToSend)));
      } catch (Exception exception) {
          _logger.LogInformation($"-PimLog- -ProductInfoController- {DateTime.Now}, &gt; Exception: {exception.Message} ");
      }
  
      _logger.LogInformation($"-PimLog- -ProductInfoController- {DateTime.Now}, EventHub Message Sent Successfully ");
  }
  </code></pre>
  
  <p>I do see the log message that Message Sent Successfully so no obvious error is there.</p>
  
  <p>When I try and run the query in the azure portal I get the following message</p>
  
  <pre><code>There is no data from input 'pimhub'. Please make sure the input source has data and then try again.
  </code></pre>
  
  <p>How can I debug further?</p>