# How to Trouble-shoot and Evaluate Environment Variables

### Environment Variables set in the Command Line

The first thing to note is that any setting for a variable on the command line overrides what is defined in any .env file. So, depending on your problem, check your crontabs and scripts for any 'hidden' variable settings.

### Is there a .env.local.php File?

An .env.local.php file is generated by the \`bin/console dotenv:dump' command, typically within your deployment pipeline. If an .env.local.php file exists, then its definitions take precedence over any other .env file. Either apply your changes to the .env.local.php file (which makes them non-persistent), or delete the .env.local.php file and apply your changes to .env. .env.local, .env.dist or .env.dist.local (depending on whether you want your changes to eventually go to the repo or not).

### Evaluate .env Files

The `bin/console debug:dotenv` command is your friend. Remember, though, that anything shown here will be overwritten by one of the two methods above - and, worst of all, its effects won't be shown here!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notebook.vanwittlaer.de/hosting/how-to-trouble-shoot-and-evaluate-environment-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
