Vscode terminal not recognized - visual-studio-code

I am trying to set up my virtual environment to run Python, Node.js, Conda, and Docker. While I am able to run these programs in the Command Prompt or PowerShell, for some reason, when I try them on the virtual environment terminal, none of the commands are recognized, even though they are in my PATH.
I restarted my computer after modifying the path.
In Visual Studio Code, in the developer tools, I used process.env.path and obtained this result.
'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\libnvvp;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Razer Chroma SDK\\bin;C:\\Program Files\\Razer Chroma SDK\\bin;C:\\Program Files (x86)\\Razer\\ChromaBroadcast\\bin;C:\\Program Files\\Razer\\ChromaBroadcast\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\rtools40\\qpdf-10.3.2\\bin;C:\\Windows\\system32\\config\\systemprofile\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.3.0\\;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\Program Files\\nodejs\\;C:\\Users\\SSosa\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\SSosa\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\SSosa\\AppData\\Local\\Programs\\MiKTeX\\miktex\\bin\\x64\\;C:\\Users\\SSosa\\AppData\\Roaming\\TinyTeX\\bin\\win32;C:\\Users\\SSosa\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files\\JetBrains\\PyCharm 2021.2.2\\bin;C:\\Program Files\\JetBrains\\PyCharm Community Edition 2021.2.2\\bin;C:\\rtools40\\qpdf-10.3.2\\bin;C:\\Users\\SSosa\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\SSosa\\Downloads\\OneCommander3.4.16.0;C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.2.4\\bin;;C:\\Users\\SSosa\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\SSosa\\AppData\\Local\\Keybase\\;C:\\Users\\SSosa\\AppData\\Roaming\\npm;C:\\Program Files\\Docker\\Docker\\resources\\bin;'
How can I fix this issue?
Thanks.

Related

Libraries available to wsl not to vscode on windows

So I was doing gpu programming using cuda and had installed the same for my wsl on windows. So the code I wrote works on wsl, printing the correct output. But the libraries such as bits/stdc++.h and sys/time.h cant be found by vscode. Why doesnt my wsl not produce any errors and how to correct this?
compiling on wsl using nvcc
libraries cant be found
So I am thinking of adding the requierd libraries to micrososft visual studio folder in program files. But I am unable to get the files for sys/time.h. Did I do some error while installing the libraries? I have Microsoft visual studio version 2022.

vscode inside WSL vs Windows

In tutorial requirement is install vscode in windows and install Remote Development extension pack. Why not just install in wsl?
I've install vscode to wsl. When I run code in wsl I get message:
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]
To no longer see this prompt, start Visual Studio Code with the environment variable DONT_PROMPT_WSL_INSTALL defined.
Which cons of run vscode in wsl as opposed to run it in Windows?
The WSL extension splits VS Code into a “client-server” architecture, with the client (the user interface) running on your Windows machine and the server (your code, Git, plugins, etc) running "remotely" in your WSL distribution.
When VS Code is started in WSL, no shell startup scripts are run.
The extension runs commands and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example /mnt/c) without worrying about pathing issues, binary compatibility, or other cross-OS challenges.
(source: MSFT DOCUMENTATION)
This is the architectural choice of Windows and - personally speaking - I feel like it's a choice to avoid conflicts and redundancies.
When running the WSL extension, selecting the 'Extensions' tab will display a list of extensions split between your local machine and your WSL distribution.
Installing a local extension, like a theme, only needs to be installed once.
Some extensions, like the Python extension or anything that handles things like linting or debugging, must be installed separately on each WSL distribution. VS Code will display a warning icon ⚠, along with a green "Install in WSL" button, if you have an extension locally installed that is not installed on your WSL distribution.

How can I make vscode installed with flatpak able to use internal terminals to run certain programs in the system?

By looking up some information, I know that the programs installed by flatpak are all running in the sandbox. Is there a way to make the sandbox environment search for some of the system environment to type content?
The program I want to use in vscode's integrated terminal is located under /usr/libexec/tmp. But the path cannot be searched in vscode's integrated terminal. However, it can be searched in an external terminal and can run programs.
Can you do some configuration in vscode using flatpak installation to accomplish the above goals?
I tried to install Code-OSS using the aur source, and the code-OSS terminal is synchronized with the system terminal environment.
However, Code-OSS cannot log in using a github account.

Can I run VSCODE in a text-only Linux terminal window similar to the way I run VIM?

I am working on a linux machine my work can benefit from VSCODE.
When I install and try to run VSCODE on an Ubuntu machine, I get this error:
root#ca012294dcc1:/tmp# code --user-data-dir /tmp
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.
/usr/share/code/bin/../code: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory
WSL is out of scope. This is not a WSL senario
Remote SSH is out of scope. I know I can connect over SSH with Visual Studio Code. But I like to replace something like VIM with code
There is no Linux GUI available. Only text mode.
Is what I am trying to do possible?

Visual Studio Code Terminal bash vs. Ubuntu for Windows 10 bash

I just started with VS Code today as I have to prepare to port some of my code to Linux and I noticed that in the Terminal section there is the option of having a WSL bash, so I thought I could use this to compile my projects with gcc right there. I already installed Ubuntu for Windows 10 from the MSFT Store some time ago an installed several packages there. The thing is that the Ubuntu bash doesn't seem to share to the Linux workspace with the bash I see in VS Code, since in the latter I am lacking all those packages I already installed; it seems to be a completely different installation. Also, I noticed that the bash in the VS Code terminal uses German language while the Ubuntu App's bash is in English. (I have no idea why this is since Windows as well as VS Code is English.)
I'm quite confused about these differences, how do ubuntu.exe and bash.exe relate to each other? Can anybody shed some light on this? Obviously, it would be preferrable to to have only ONE Linux workspace in WSL so I don't have to have duplicates (of my data and also the installed packages) at different places.
To use WSL bash in VS Code integrated terminal, you need to add/change setting:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe",
Restart VS Code or integrated terminal.
If two or more WSL distro are installed, then you need to specify the path to the desired distro.
For example you can find it by running: where ubuntu, where ubuntu1604 or where ubuntu1804. And change the settings to the desired ones. For example:
"terminal.integrated.shell.windows": "C:\\Users\\USERNAME\\AppData\\Local\\Microsoft\\WindowsApps\\ubuntu1604.exe",