--dotnet-isolated-debug does not emit process ID when logLevel.Host=Error

See original GitHub issue

The --dotnet-isolated-debug argument does not emit process ID when logLevel.Host=Error.

Repro steps

  • Create a new Azure Functions project, V4, with the .NET Isolated Worker.
  • Add one function, for example an HTTP trigger
  • Add the following host.json:
{
    "version": "2.0",
    "logging": {
        "applicationInsights": {
            "samplingSettings": {
                "isEnabled": true,
                "excludedTypes": "Request"
            }
        },
        "logLevel": {
            "default": "Warning",
            "Host": "Error",
            "Function": "Information"
        }
    }
}
  • Run func.exe host start --pause-on-error --dotnet-isolated-debug on the terminal

Expected

The following output is written to console:

Azure Functions Core Tools
Core Tools Version:       4.0.4483 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.1.3.17473

[2022-05-17T05:47:08.069Z] Azure Functions .NET Worker (PID: 19708) initialized in debug mode. Waiting for debugger to attach...

Actual

No worker process id is written to console, and attaching a third-party debugger automatically is not possible.

Extra information

Setting the environment variables FUNCTIONS_ENABLE_DEBUGGER_WAIT=True and FUNCTIONS_ENABLE_JSON_OUTPUT=True in addition does also not emit the PID.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
fabiocavcommented, Jun 8, 2022

@maartenba we’re making some changes in other components to address how this is handled and expect the change to be in place in the sprint starting today (done within two weeks). We can provide information on how to validate this once the change is in.

1reaction
fabiocavcommented, Jun 22, 2022

This work has been addressed in the host and will be available in version 4.7.0 (https://github.com/Azure/azure-functions-host/releases/tag/v4.7.0).

We’ll keep this issue open until we have full validation targeting that build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide for running C# Azure Functions in an isolated worker ...
Learn how to use a .NET isolated worker process to run your C# functions in Azure, which supports non-LTS versions of .NET and...
Read more >
Failed to start a new language worker for runtime: dotnet ...
I was just dealing with the same problem. I finally fixed it by adding .ConfigureFunctionsWorkerDefaults() to my Program.cs file.
Read more >
Unable to debug out-of-process (dotnet-isolated) Azure ...
I'm always getting Azure Functions host did not return isolated worker process id . Starting the function via func host start --dotnet-isolated-debug and ......
Read more >
Tracer Debug Logs
Use Datadog debug settings to diagnose issues or audit trace data. Datadog does not recommend that you enable debug mode in production systems...
Read more >
Debugging Apache Web Server Problems
This article provides an introduction to debugging apache web server problems, and covers several tools and techniques that can help troubleshoot problems when ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found