Search code examples
azureremote-debuggingazure-appservice

Unable to connect to the Microsoft Visual Studio Remote Debugger. Operation not supported. Unknown error: 0x80004005


I have deployed the following API as is to an Azure App Service from Visual Studio. I have made sure that I have Remote Debugging and Visual Studio version 2022 selected in General settings in the App Service Configuration.

enter image description here

When I try and attach process from Visual Studio to my App Service I get thefollowing error:

enter image description here


Solution

    • In VS 2022, We have an easy and direct way to attach debugger.
    • After publishing your WebApp, In Hosting settings we will find an option to Attach Debugger.

    enter image description here

    Once debugger is attached, Remote debugging is enabled in Portal => Configuration Settings automatically.

    enter image description here

    • Place a break point in any of the form which you want to debug.
    • Visual Studio finds the process, all the symbols will be loaded, and debugger is attached.

    enter image description here