Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode tunnel cannot use new environment variables #234324

Closed
kirning opened this issue Nov 21, 2024 · 4 comments
Closed

VSCode tunnel cannot use new environment variables #234324

kirning opened this issue Nov 21, 2024 · 4 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@kirning
Copy link

kirning commented Nov 21, 2024

I started the VSCode tunnel service on the server, and then installed a Node.js application on the server side. It works fine when used directly through PowerShell on the server, but when I connect to the server's tunnel from my local machine and use the terminal in VSCode, it prompts that the command is not found. I have restarted the tunnel service, but it still doesn't work. What should I do?

@zhaoqiu-china
Copy link

my problems are very similar to yours. I can not see new environment variables in my laptop(win10 24h2) after I changed these environment variables in server(win10 24h2).

@legomushroom
Copy link
Member

Hey @kirning there are multiple moving pieces involved here, so mind providing clear step-by-step instructions on how to reproduce the issue? That will help us to assist you effectively.

but when I connect to the server's tunnel from my local machine

Do you mean that you create a tunnel for the SSH server port on the server and then connect to it from the local machine using vscode? Do you connect directly from the terminal or using a Remote (tunnel/SSH) functionality?

@legomushroom legomushroom added the info-needed Issue requires more information from poster label Dec 13, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 19, 2024

PATH discrepancy on tunnels connected machine? Maybe related to the shell environment not being sourced correctly on the server side?

@Tyriar Tyriar assigned connor4312 and unassigned Tyriar Dec 19, 2024
@Tyriar Tyriar removed the info-needed Issue requires more information from poster label Dec 19, 2024
@connor4312
Copy link
Member

Yes, if the tunnel is installed as a service, you will want to make sure your environment variable modifications are made in a place where the service will also receive them. Or set them in a dotfile so that they're applied whenever you open a new terminal.

@connor4312 connor4312 added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 19, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

6 participants