Skip to content

Commit 3a0b092

Browse files
committed
docs: warning about environment variables
1 parent ea35b3c commit 3a0b092

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/guides/vscode.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ Because the VSCode extension establishes a long-running process connected to the
149149

150150
Therefore, we do not recommend using DuckDB as a state store with the VSCode extension.
151151

152+
### Environment variables
153+
154+
The extension runs the language server in a separate process. This inherits the environment variables of the parent vscode instance but it does not necessarily inherit the environment variables of the terminal instance. This means that if you have environment variables set in your VSCode terminal, they will not necessarily be available to the language server. Making sure that the language server has access to any variables you call upon can either be done by ensuring the variables are set in the environment the LSP runs:
155+
156+
- by opening vscode from a terminal that has the variables set
157+
- by not using environment variables but pulling them from somewhere else (e.g. a `.env` file)
158+
- by setting the environment variables in the VSCode settings in the python extension settings that you can find detailed [here](https://code.visualstudio.com/docs/python/environments#_environment-variables)
159+
152160
### Python environment woes
153161

154162
The most common problem is the extension not using the correct Python interpreter.

0 commit comments

Comments
 (0)