When I open my visual studio code my terminal is blank, neither ubuntu, nor command prompt, nor powershell, nor JavaScript debugger work.
I tried to change the path by which vs code calls my ubuntu but it didn't work.
Related
For some reason, when I type the command code . from a WSL terminal I have the message:
Command is only available in WSL or inside a Visual Studio Code terminal.
After some research, I tried to fix it with the following commands:
rm -r ~/.vscode-server
code .
It redownloads VS Code Server and it works correctly but just for one terminal instance. When I open a new terminal, I still have the message :
Command is only available in WSL or inside a Visual Studio Code terminal.
I don't have the issue when I use the command code in a VS code terminal.
As the title says, VS Code is not recognizing cl compiler although opened via Visual Studio 2022 Developer Command Prompt:
VS Code terminal:
I have tried using VS Code external terminal with %comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
which did not work.
Setting the comspec manualy in the terminal did solve the issue for the terminal instance:
But the C++ extension is still complaining about cl.exe:
cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.
I have never used VS Code for C++ before and I don't use windows for development at all so go easy on me.
What could be the reason for the issue and how it can be solved?
Visual Studio Developer Command Prompt must be elevated(run as Administrator) in order to correctly open VS Code with the needed permissions.
Running Visual Studio Developer Command Prompt as Admin solves the issue.
One solution that worked for me is to go directly in the setting for C++ extension and find compiler path setting, and manually set it to cl.exe path on your computer.
Whenever I try to open terminal of visual studio code my terminal remains blank and I am not able to type anything in the terminal I have switched power shell to command prompt but the same issue persist I have included the screenshot
Try opening VSC as an administrator
On Windows 10, I have Visual Studio Code installed.
When I open the terminal (Git Bash) and type less-watch-compiler, I get the error:
Segmentation fault
But if I go to the Git Bash terminal itself (outside Visual Studio Code) and type less-watch-compiler, the command works.
How can I fix this problem?
I reinstalled Git for Windows, but it didn't help.
I have the latest version of Visual Studio Code (1.36.1)
When I use the "cmd" editor within Visual Studio Code, it works fine as well.
Not sure if it's the same problem but I was also getting segmentation fault errors running VSCode with WSL.
What fixed it for me was:
rm -rf ~/.vscode-server
The next time I tried the command, VScode downloaded the necessary files and everything worked again.
I have installed Visual Studio Code on my Windows 8.1 PC. After installing it launches correctly. When I try to launch from the command prompt with "code .", I get a prompt that the command isn't recognized.
If you install VS Code through the setup, this code.cmd will be placed automatically in C:\Users\<your name>\AppData\Local\Code\bin. Please verify that the command is there!