Search code examples
azure-web-app-servicevisual-studio-2019remote-debugging

Cannot remote debug Azure AppService "unable to find a process called w3wp"


I have freshly deployed my ASP.NET web application (dotnet 5) to an azure AppService

It is bare-bones in the fact that there's no WebAPI controllers, no routing, no MVC views. It has a simple middleware class that does some request/response trickery to essentially perform work as a reverse proxy.

Everything is actually working pretty well, but I cannot do remote debugging on this site. I've tried to deploy it as both 'portable' and as 'x86', but get the same result. This is the error message where xxxxxx is my app service name.

Unable to find a process called w3wp with arguments "xxxxxxx. The process may still be starting, please try again.

remote-debugging-screenshot


Solution

    • Make sure Remote Debugging is enabled in Azure Portal. Go to Azure Portal =>Your App Service =>Configuration => Select General settings.

    enter image description here

    • Change the Configuration option to Debug

    enter image description here

    • I got the same issue when I Attach debugger from Hosting menu.
    • Instead of "Attach Debugger", use Attach process from the VS debug menu.
    • Place breakpoint in any of your form. As I am using the basic application ,I have placed in Index.cshtml.cs.
    • Copy the Credentials from the Azure Portal.

    enter image description here

    • VS 2019=> Go to Debug tab => Attach process => In Connection Target paste your site url without htttp like(myappservice.azurewebsites.net)
      =>Refresh button => add your app service credentials username and password=> A list of process will be shown to you just click on the w3wp.exe process => Select Show Processes from all users.

    enter image description here

    enter image description here