简体   繁体   English

在本地调试azure应用服务?

[英]Debug azure app service locally?

I try to create a mobile app base on the azure "App Service". 我尝试基于天蓝色的“应用服务”创建一个移动应用。 I downloaded an example app ( Todo App ) which was ready-to-go. 我下载了一个随时可以使用的示例应用程序( Todo App )。

Now I'm changing it to my needs. 现在,我正在根据自己的需要对其进行更改。 The problem is that I get an "internal server error"... 问题是我收到“内部服务器错误” ...

Is there a way to debug the backend service (which runs on azure normally). 有没有一种方法可以调试后端服务(通常在azure上运行)。 The backend project can be run locally in Firefox, but that doesn't help me, because the behaviour on the server depends on the SQL database. 后端项目可以在Firefox中本地运行,但这对我没有帮助,因为服务器上的行为取决于SQL数据库。

Is it possible either to debug with Visual Studio directly on the azure server or run it locally, but simulate the same conditions as on the server (database, connection to a mobile client...) 是否可以直接在azure服务器上使用Visual Studio进行调试或在本地运行它,但是模拟与服务器上相同的条件(数据库,与移动客户端的连接...)

Yes, you can debug the App Service published on Azure. 是的,您可以调试在Azure上发布的App Service。

Publish your app with visual studio. 在Visual Studio中发布您的应用。 On settings tab, select the debug configuration. 在设置选项卡上,选择调试配置。

When published, on Cloud Explorer or Server Explorer (visual studio) search the app and right click on App and click Attach Debugger. 发布后,在Cloud Explorer或Server Explorer(Visual Studio)上搜索该应用程序,然后右键单击App并单击Attach Debugger。

Enable your breakpoint and make the request. 启用您的断点并发出请求。 Happy debug! 调试愉快!

If you update your code and not publish it, I'm not sure how it will behave, better republish and debug again. 如果您更新代码而不发布,我不确定它的行为,最好重新发布并再次调试。

(More info: https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#remotedebug ) (更多信息: https : //azure.microsoft.com/zh-cn/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#remotedebug

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

相关问题 在本地调试Azure WebJob - Debug Azure WebJob locally 带有应用配置和托管标识的 Azure 函数 - 如何在本地调试 - Azure Function with App Config and managed identity - how to debug locally 使用 KeyVault 机密覆盖 Azure 应用服务中和本地的应用设置 - Using KeyVault secrets to override appsettings in Azure App Service and locally Azure App Service的本地调试版本中的身份验证导致401未经授权 - Authentication in local debug build of Azure App Service results in 401 Unauthorized 如何在本地调试azure功能 - How do I debug azure function locally Azure移动服务:仅在本地定义表 - Azure mobile service: Define a Table only locally 通过Azure门户启用AAD后在本地调试网站 - Debug Website Locally After Enabling AAD Via Azure Portal 如何使用Visual Studio在本地调试Azure函数? - How do I debug an Azure Function locally with Visual Studio? Azure function 活动在点击本地运行或调试后自动启动 - Azure function activity starts automatically after clicking on Run or Debug locally Razor 视图在本地有效,但在 Azure Web 应用程序中无效 - Razor view works locally but not in Azure web app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM