简体   繁体   English

我如何远程调试部署在 azure 应用程序服务上的 asp.net 核心 web 应用程序

[英]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.我正在开发一个 asp.net 核心 web 应用程序。

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.我可以使用 visual studio 在我的本地计算机上执行此操作。

I can do it too if i deploy my web application on a remote IIS Server.如果我在远程 IIS 服务器上部署我的 web 应用程序,我也可以这样做。

But i want to do this when my application is deployed on an azure app service.但是当我的应用程序部署在 azure 应用程序服务上时,我想这样做。

This container does not work with IIS. It seems an azure app service works with Kestrel (do.net run command).此容器不适用于 IIS。似乎 azure 应用程序服务可与 Kestrel(do.net 运行命令)一起使用。 And i don't know how i can remotely debug this application.而且我不知道如何远程调试此应用程序。

Thanks谢谢

Additionnal informations:附加信息:

  • I am working with.Net6我正在使用.Net6
  • What i mean by "container" is "Azure app service instance"我所说的“容器”是指“Azure 应用服务实例”
  • I am working with Visual Studio 2022 community edition我正在使用 Visual Studio 2022 社区版
  • I am deploying with azure devops and azure pipelines我正在部署 azure devops 和 azure 管道

If you want use remote debug feature, you need to use Debug model when you deploy your webapp.如果你想使用远程调试功能,你需要在部署你的webapp时使用Debug model。

Something like below in Visual Studio.在 Visual Studio 中类似下面的内容。

在此处输入图像描述

In azure devops, you can find it like:在 azure devops 中,你可以这样找到它:

  1. Pipelines > Builds (or Pipelines) , open your build pipeline Pipelines > Builds (or Pipelines) ,打开你的构建管道

  2. Click in Edit, Variables tab, change the value from variable BuildConfiguration from "release" to "debug"单击编辑, Variables选项卡,将变量 BuildConfiguration 的值从“release”更改为“debug”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 面向完整框架的ASP.NET Core 1.1无法部署到Azure App Service - ASP.NET Core 1.1 targeting full framework can not be deployed to Azure App Service 当托管在Azure应用程序服务中时,如何控制添加到ASP.NET核心Web应用程序中的HTTP响应标头? - How can I control the HTTP response headers added to my ASP.NET core web application when hosted in Azure app service? ASP.NET 核心 Razor 页面中的 Active Directory 交互式身份验证 - Active Directory Interactive authentication in ASP.NET Core Razor Pages Web App not working when deployed to Azure App Service 如何从Mac上的Azure应用服务上远程调试ASP.NET Core? - How to Remote Debug ASP.NET Core on an Azure App Service from a Mac? 如何将 Blazor Web 程序集与 ASP.NET 核心托管和身份验证应用程序发布到 ZCF04A02E37B774FC3917A 服务? - How to publish Blazor Web assembly with ASP.NET core hosting and identity auth app to azure App Service? 如何将asp.net核心web作业发布到azure app服务 - How to publish asp.net core web job to azure app service 如何在ASP.NET Core 6.0 Web API中读取Azure App服务的应用设置 - How to read application setting of Azure App service in ASP.NET Core 6.0 Web API 是否可以通过Visual Studio在Linux服务计划上将ASP.NET Core应用发布到Azure AppService中? - Can I publish a ASP.NET Core app into an Azure AppService on a Linux Service Plan from Visual Studio? 如何调试部署在Azure App Service上的Web API? - How to debug Web API deployed on Azure App Service? 如何配置 ASP.NET MVC Core 6 Web 应用程序以使用两个不同的 Azure AD 租户作为身份验证机构? - How can I configure an ASP.NET MVC Core 6 web app to use two different Azure AD tenants as authentication authorities?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM