Search code examples
visual-studio-2017azure-service-fabricdiagnostic-tools

Can't connect to Diagnostic Events while debugging Service Fabric app


I just created a fresh Service Fabric app with a stateless ASP.NET Core Web API service as an admin with a 5-machine debug cluster running locally. When I debug it (or any other Service Fabric app), it launches and runs successfully (e.g. I can see the expected output when I navigate to the endpoint with my browser or with Postman), I can see it running fine in the Service Fabric Explorer and I can see output in the Debug window within Visual Studio 2017, but I cannot see any events in the Diagnostic Events (note, not Diagnostic Tools) panel.

When I start debugging, the Diagnostic Events panel shows up as expected, but remains empty. I have no filter applied (no change if I click "Clear Filter" for the heck of it) and it shows at the bottom that it's Disconnected with 0 of 0 events shown. However, if I click on the green Start button, nothing happens and it continues to stay in a state of being disconnected.

Why is this and how can I get it to connect so I can see the output of ServiceEventSource calls?


Solution

  • Make sure that the name of the EventSource is set in the ETW Providers window:

    enter image description here

    enter image description here