'How can i remotely debug an asp.net core web app deployed on an azure app service

I am working on an asp.net core web application.

I need to debug this application (put a breakpoint and inspect variables when this breakpoint is hit).

I can do this on my local computer, with visual studio.

I can do it too if i deploy my web application on a remote IIS Server.

But i want to do this when my application is deployed on an azure app service.

This container does not work with IIS. It seems an azure app service works with Kestrel (dotnet run command). And i don't know how i can remotely debug this application.

Thanks

Additionnal informations:

  • I am working with .Net6
  • What i mean by "container" is "Azure app service instance"
  • I am working with Visual Studio 2022 community edition
  • I am deploying with azure devops and azure pipelines


Solution 1:[1]

If you want use remote debug feature, you need to use Debug model when you deploy your webapp.

Something like below in Visual Studio.

enter image description here

In azure devops, you can find it like:

  1. Pipelines > Builds (or Pipelines), open your build pipeline

  2. Click in Edit, Variables tab, change the value from variable BuildConfiguration from "release" to "debug"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jason