-
Notifications
You must be signed in to change notification settings - Fork 293
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 using problem of WSL #4367
Comments
I make sure that have problem in wsl, because ".vscode" folder is empted. I want to know if there is a way to initialize only this part, or to allow me to use VS Code interactions normally in WSL. |
Hi @dawnli-github, thanks for writing this up. Just to make sure I understand:
Does it seem like the following could help with your permission issues, so that you can just have a Windows installation of VS Code, correct permissions, and connect to it via Remote-WSL? microsoft/vscode#85778 microsoft/WSL#3833 ohmyzsh/ohmyzsh#8964 I do recognize you mention it seems unrelated to paths, though that's what several solutions would seem to suggest investigating.
Could you help clarify this for me? What are you looking to initialize? |
Now I have solved this problem by reinstall, I install the order "zsh", "conda", "vscode".I can use it normally, but to my surprise, after installing "vscode", I only have "home/dawnli/.vscode-server" in the folder under "home/dawnli" (I am using wsl-ubuntu20.04). When I had problems at first, there were "home/dawnli/.vscode" and "home/dawnli/.vscode-server" in the folder under "home/dawnli".I think the reason can be explored.As for the "Permission Denied" issue you mentioned, I was able to run "conda list" and "python" in terminal by editing "~/.zshrc." It was a bit more hassled, but at least I was able to set the correct environment variables via zsh.Therefore, the problem may also be in the Win10 "VScode" and WSL "VScode" communication problems.Thank you for your attention, and I hope that those of you who are experiencing problems can learn to step by step backup WSL, which is fast and doesn't take too much time.It took me two or three reloads to fix the problem, and if I had backed it up in the first place, I wouldn't have wasted a lot of time. |
Thank you for the updates and insights on your fixes @dawnli-github. If you face any other issues or have further questions, please feel free to let us know. |
When I was using WSL with VS Code, I was initially able to use the "code." command in WSL to interact with VS Code, but shell tell me "zsh: permission denied: code".Yes, I am using ZSH, but this does not seem to be related to the common "PATH" problem. At first I configured the PATH in "
/.zshrc" and was able to use vscode, but later I suddenly found the "/.vscode" file was cleared. Then I uninstalled and reinstalled the deb of vscode, but it didn't seem to make any sense.Finally, keep repeating the following:To use Visual Studio Code with the Windows Subsystem for Linux,please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the
code
command in a WSL terminal just as you would in a normal command prompt.Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
code .
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the
code
command in a WSL terminal just as you would in a normal command prompt.Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
code .
To use Visual Studio Code with the Windows Subsystem for Linux, please install Visual Studio Code in Windows and uninstall the Linux version in WSL. You can then use the
code
command in a WSL terminal just as you would in a normal command prompt.Do you want to continue anyway? [y/N] y
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined."
I installed Anaconda (I choose "No" on whether to install VS Code), zsh, oh-my-zsh, and some basic environment configurations
Now I can't use vscode in wsl, I hope to repair it because I don't want to reinstall WSL for the fourth time!
The text was updated successfully, but these errors were encountered: