title: How do I test an Azure Function triggered by Azure Service Bus in Azure Portal?
body: <p>I created an <strong>Azure Function</strong> with a <strong>Azure Service Bus Topic trigger</strong> in <strong>Visual Studio 2019</strong>. The <code>local.settings.json</code> and the publish profile are given below.</p>
  <p>The Azure Function works in my laptop. I sent a message to the <strong>Azure Service Bus</strong> and the function is executed and see the log in the <strong>Azure Function CLI Shell</strong>.</p>
  <p><strong>local.settings.json</strong></p>
  <pre><code>{
    &quot;IsEncrypted&quot;: false,
    &quot;Values&quot;: {
      &quot;AzureWebJobsStorage&quot;: &quot;UseDevelopmentStorage=false&quot;,
      &quot;FUNCTIONS_WORKER_RUNTIME&quot;: &quot;dotnet&quot;,
      &quot;mysubscription&quot;: &quot;Endpoint=...&quot;
    }
  }
  </code></pre>
  <p><strong>Publish Profile</strong></p>
  <p><a href="https://i.stack.imgur.com/Z0tCf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z0tCf.png" alt="enter image description here" /></a></p>
  <p>I published the Function to Azure. The Function is running. But nothing happens after I send a message to the <strong>Azure Service Bus</strong>*.</p>
  <p>My questions are:</p>
  <ol>
  <li>I see error for Run Time Version Error. What configuration I need to change to make it working.</li>
  <li>I want to see the output of <code>log.LogInformation($&quot;C# ServiceBus topic trigger function processed message: {mySbMsg}&quot;);</code>. Which menu item that I need to use to see the logs like I see in the shell in my laptop?</li>
  </ol>
  <p><strong>Azure Portal</strong></p>
  <p><a href="https://i.stack.imgur.com/5EY3R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5EY3R.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/Cs5BA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cs5BA.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/cDi4c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cDi4c.png" alt="enter image description here" /></a></p>
  <p><strong>UPDATE 6/25/2020</strong></p>
  <p>I added a new application setting <code>mysubscription</code> in the Azure Portal for that Function App. I can see the Function Execution count increasing. I also integrated the Application Insights and can see the log from the application. Here is the sample:</p>
  <p><a href="https://i.stack.imgur.com/wTzNr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wTzNr.png" alt="enter image description here" /></a></p>