简体   繁体   中英

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 (do.net 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

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

Something like below in Visual Studio.

在此处输入图像描述

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM