You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/vscode.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,12 +155,11 @@ The VSCode extension is based on a [language server](https://en.wikipedia.org/wi
155
155
156
156
If you have environment variables that are needed by the context and the language server, you can use one of these approaches to pass variables to the language server:
157
157
158
-
- Open VSCode from a terminal that has the variables set (e.g. `.zshrc` or `.bashrc`). This will automatically be picked up by the language server only if you have `export ENV_VAR=value` in your shell configuration file when initializing the terminal.
159
-
- Use environment variables pulled from somewhere else dynamically (e.g. a `.env` file) in your root project directory. This will automatically be picked up by the language server.
158
+
- Open VSCode from a terminal that has the variables set already.
159
+
- If you have `export ENV_VAR=value` in your shell configuration file (e.g. `.zshrc` or `.bashrc`) when initializing the terminal by default, the variables will be picked up by the language server if opened from that terminal.
160
+
- Use environment variables pulled from somewhere else dynamically (e.g. a `.env` file) in your root project directory. This will automatically be picked up by the language server through the python environment that the extension uses.
160
161
- Set the environment variables in the python environment that the extension uses. You can find detailed instructions [here](https://code.visualstudio.com/docs/python/environments#_environment-variables)
161
162
162
-
#### Troubleshooting Environment Variables
163
-
164
163
You can verify that the environment variables are being passed to the language server by printing them in your terminal.
165
164
166
165
1.`Cmd +Shift + P` (`Ctrl + Shift + P` in case of Windows) to start the VSCode command bar
@@ -180,7 +179,7 @@ If you change your environment variables in the terminal during development(e.g.
180
179
181
180
3. Print the environment variables based on the instructions above to verify the changes have taken effect.
182
181
183
-
### Python environment troubleshooting
182
+
### Python environment issues
184
183
185
184
The most common problem is the extension not using the correct Python interpreter.
0 commit comments