在一个项目中使用 .NET Function Framework 和多个 Google Cloud HTTP Functions;如何设置调试入口点?

Using .NET Function Framework with multiple Google Cloud HTTP Functions in one project; how to set entry point for debugging?

我正在使用 .NET Function Framework 创建一些 C# HTTP 函数并将其部署到 Google 云。我在一个项目中定义了多个 HTTP 函数。

如何在 Visual Studio 中设置入口点以便指定要调试的入口点?

或者是否有调试方法让它们同时监听?

找到答案,记录在 Google 自己的文档中 here

在 Visual Studio 中,您可以 运行 从 PMC 使用目标参数执行以下命令:

dotnet run --target Namespace.MyFunctionName

或者在“调试”>“调试属性”>“命令行参数”中编辑参数:

--target Namespace.MyFunctionName

然后就可以正常使用F5进行调试了。