Running dotnet isolated in debug mode.

huangapple go评论61阅读模式
英文:

Running dotnet isolated in debug mode

问题

I have created an Azure function V4 on .NET6 running in dotnet-isolated mode.

When i start the function using the regular run configuration it starts up fine.
When i then attach the debugger manually i can succesfully debug the function.

However when i start the function using the debug configuration it looks like the process fails to attach and an exception is thrown:

[2023-02-27T09:07:42.258Z] Failed to start a new language worker for runtime: dotnet-isolated.
[2023-02-27T09:07:42.259Z] System.Private.CoreLib: A task was canceled.

The function start up command is the following: Running dotnet isolated in debug mode.

I am using azure toolkit for rider version: 3.50.0.1546-2022.3
I am using rider version 2022.3.2

英文:

I have created an Azure function V4 on .NET6 running in dotnet-isolated mode.

When i start the function using the regular run configuration it starts up fine.
When i then attach the debugger manually i can succesfully debug the function.

However when i start the function using the debug configuration it looks like the process fails to attach and an exception is thrown:

[2023-02-27T09:07:42.258Z] Failed to start a new language worker for runtime: dotnet-isolated.
[2023-02-27T09:07:42.259Z] System.Private.CoreLib: A task was canceled.

The function start up command is the following: Running dotnet isolated in debug mode.

I am using azure toolkit for rider version: 3.50.0.1546-2022.3
I am using rider version 2022.3.2

答案1

得分: 1

当我将函数主机参数设置为 host start --pause-on-error 时,不附加到任何进程,使用此配置进行调试时,调试工作正常:

Running dotnet isolated in debug mode.

在调试配置中将函数主机参数更改为 host start --dotnet-isolated-debug --verbose,并且不附加到任何进程。保留断点,然后使用函数应用配置进行调试:

Running dotnet isolated in debug mode.

这是一个.NET 6隔离的v4 Azure函数项目。

英文:

When I have Function Host Arguments as host start --pause-on-error,

Running dotnet isolated in debug mode.

then debugging is working fine with this configuration without attaching to any process:

Running dotnet isolated in debug mode.

After changing the Function Host Arguments to host start --dotnet-isolated-debug --verbose in the Debug Configuration and do not attach to any process. Keep the breakpoint and hit debug with the Function App Configuration:

Running dotnet isolated in debug mode.

It’s a .NET 6 Isolated v4 Azure Function Project.

答案2

得分: 1

重新安装了Azure CLI和Azure函数核心工具,现在我可以进行调试。

英文:

Completely reinstalled Azure CLI and Azure functions core tools, i can debug now.

huangapple
  • 本文由 发表于 2023年2月27日 17:10:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75578545.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定