0

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: function host arguments

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

2 Answers2

1

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

enter image description here

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

enter image description here

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:

enter image description here

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

Pravallika KV
  • 2,415
  • 2
  • 2
  • 7
1

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

  • how did you install the core tools? Via brew or Rider? – fvl Apr 12 '23 at 13:19
  • I installed them from the microsoft documentation page. See: [Microsoft docs](https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cwindows%2Ccsharp%2Cportal%2Cbash) – Tristan Boland Apr 13 '23 at 09:53