title: Visual studio profiler not working for Azure Function
body: <p>Is it possible to do local memory profiling using Visual Studio Enterprise 2019 (v16.6.3)? I've tried <code>.NET Object Allocation Tracking</code>, <code>Memory usage</code> and <code>CPU usage</code> using the startup project but I keep getting no data:
  <a href="https://i.stack.imgur.com/SYvbk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SYvbk.png" alt="Screenshot of profiling options in Visual Studio Enterprise 2019" /></a></p>
  <p>When I switch to <code>Attach to a running process</code>, I have a lot less options but I do see data when running <code>CPU usage</code> and attaching it to the running <code>func.exe</code>:
  <a href="https://i.stack.imgur.com/guHht.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/guHht.png" alt="enter image description here" /></a></p>
  <p>This might be the cause: <a href="https://docs.microsoft.com/en-us/visualstudio/profiling/troubleshooting-performance-tools-issues?view=vs-2017#no-data-is-collected-by-the-profiling-tools" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/visualstudio/profiling/troubleshooting-performance-tools-issues?view=vs-2017#no-data-is-collected-by-the-profiling-tools</a></p>
  <p>How can I do memory profiling on an azure function?</p>