Azure/azure-functions-core-tools

Promote CLI_DEBUG to local.settings.json

オープン

#3,213 opened on 2022/12/02

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)C# (491 件のフォーク)auto 404
area: cliarea: loggingenhancementgood first issue

Repository metrics

Stars
 (1,456 個のスター)
PR merge metrics
 (PR metrics pending)

説明

When developing/debugging functions locally one would like to see as much information as possible when something goes wrong.

When running functions with func host start --verbose exception stack trace is missing. Somehow there is a non-documented (?) secret env var to tweak this behavior, e.g. running CLI_DEBUG=1 func host start --verbose (or setting Values.CLI_DEBUG: 1 in local.settings.json). I couldn't find this documented anywhere, only hinted in a few issues here and stackoverflow.

Could you promote the env var to an official flag inside local.settings.json, updating also the documentation at https://learn.microsoft.com/azure/azure-functions/functions-develop-local#local-settings-file? Or perhaps enable it automatically when one uses --verbose?

Something like the snippet below:

"Debugging": {
    "ShowExceptions": true
}

Kudos if you make it the default config on localhost, ie. make local development easier for the mass.

コントリビューターガイド