Search code examples
visual-studioazure-service-fabric

Debug service startup code on Azure Service Fabric apps


Each time we want to debug a Service Fabric application, we normally deploy the app to the SF cluster and attach our visual studio to the pertinent service processes. The problem being, if we want to debug the service startup code, it's not possible, because at the time that service is running and is attachable, startup code is already done. Does Anyone know how to solve this problem?

One way that comes to my mind is to put Thread.Sleep in startup code and wait to make enough time for attaching to the process from VS. But I'm actually looking for a proper way of debugging SF apps.


Solution

  • Here is the way to debug SF app properly. I had some issues with my VS which is resolved.

    https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-debugging-your-application