在本地调试两个Azure Functions项目 [英] Debugging two Azure Functions projects locally

本文介绍了在本地调试两个Azure Functions项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Azure Functions项目。

I have two Azure Functions projects.

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

I have one project, A, running on localhost:7071/api/....

我将另一个项目B更改为在 localhost:8888 / api /...

I have changed the other project, B, to run on localhost:8888/api/...

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

I am calling a function which is running on project A from a function in Project B! How can I debug two Azure Functions projects locally? I cannot find any docs to help me.

推荐答案

要解决此问题,请添加命令行开关- -nodeDebugPort 5859 到启动 func主机来设置会话之一的端口。

To fix the issue add the command line switch --nodeDebugPort 5859 to your launching of func host to set the port for one of the sessions.

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

If you are launching from within Visual Studio you need to go to Project -> Properties -> Debug, then under Application arguments you need to pass in a value that looks similar to host start --pause-on-error --nodeDebugPort 5859 (again, for one project).

请参见此问题这部影片

这篇关于在本地调试两个Azure Functions项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆