Azure / Azure/azure-functions-core-tools
Promote CLI_DEBUG to local.settings.json
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
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:
```json
"Debugging": {
"ShowExceptions": true
}
```
Kudos if you make it the default config on localhost, ie. make local development easier for the mass.
Contributor guide
Research direction
Start by reproducing `func host start --verbose` with and without `CLI_DEBUG=1`, then read the local settings file documentation linked in the issue. Determine the intended local configuration name and its relationship to `--verbose`; done means the exception behavior is implemented consistently and the setting is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100