Reputation: 87
In VS Code, environment variables can be edited by profile or rc files, such as .bash_profile
or .bashrc
in integrated terminal.
However, when I tried to run a Jupyter notebook file on ssh-remote server, the edited environment variables were not reflected to the .ipynb
file even though I ran source ~/.bashrc
command, restarted VScode
, and deleted my ssh session.
What is the method to refresh shell of the remote server while running VS Code?
Upvotes: 1
Views: 2401
Reputation: 66
Try to restart the remote server you are connecting to, by using the Kill VS Code Server On Host...
command from the command palette (CTRL+SHIFT+P), selecting the host you experience the problem with, then closing and restarting VS Code.
I had the same problem today, and this worked for me. The VS Code server does not seem to update the environment variables e.g. from .bashrc
dynamically.
Upvotes: 5