azure - 在本地调试两个 Azure Functions 项目

标签 azure azure-web-app-service azure-functions azure-functions-runtime azure-functions-core-tools

我有两个 Azure Functions 项目。

我有一个项目 A,在 localhost:7071/api/.... 上运行

console output of project A, showing port 7071

我已更改另一个项目 B,以在 localhost:8888/api/... 上运行

console output of project B, showing port 8888

我正在从项目 B 中的函数调用在项目 A 上运行的函数!如何在本地调试两个 Azure Functions 项目?我找不到任何可以帮助我的文档。

最佳答案

要解决此问题,请将命令行开关 --nodeDebugPort 5859 添加到 func host 的启动中,以设置其中一个 session 的端口。

如果您从 Visual Studio 中启动,则需要转到 Project -> Properties -> Debug,然后转到 应用程序参数您需要传入一个类似于host start --pause-on-error --nodeDebugPort 5859的值(同样,对于一个项目)。

参见this issuethis video .

关于azure - 在本地调试两个 Azure Functions 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51932289/

相关文章:

pdf - Power App - 生成 PDF

azure - 您可以邀请 Azure 政府云 AAD 租户中的 guest 用户吗?

Azure 服务总线同步所有主数据

asp.net - 通过 Blob 存储的链接或通过 Controller 操作提供 PDF?

azure - 使用 Bower 依赖项将网站部署到 azure

c# - 如何从路由中删除 "api"- Azure Functions v3 - host.json routePrefix 空字符串不起作用

angular - Azure DevOps 中的 CI/CD 到 Angular Web 应用程序成功,但没有任何反应

azure - Windows Azure - 迁移问题

Azure 部署槽和数据库迁移

当新消息进入服务总线队列时,Azure 函数(服务总线触发器)无法启动