VS Code - WSL - Go To Definition not working - visual-studio-code

Pressing F12 to Go To Definition in VS Code is not working for me with WSL extension.
I verified F12 was being recognized by turning on Screencast Mode, and that WSL is causing the Go To Definition issue by uninstalling the WSL extension and trying F12 in another project.
Is there any other information I can provide? This was working for me a few days ago and nothing changed that I know of. I tried older versions of WSL extension and was not able to get Go To Definition to work.
Thank you!

I'am using VsCode with WSL extension for C# project and the next thing helped me. It looks like you have to install extensions for each language again in 'wsl version of vsCode'. Once you open project go to ExtensionManager and try to install adequate extension (in my case for C# that was omnisharp), instead regular install button there should be 'Install in WSL:ubuntu' button. Once installation is completed restart VsCode and it should/may work.

I noticed that the terminal was stuck in "starting..." state. I think I was able to resolve this issue by installing the "Terminal Here" WSL extension.

Related

Integrated powershell core not working in vscode terminal

In vscode extension marketplace , I am getting the option of powershell preview version and not the stable version. Is there any other alternate to solve this issue?
In VS Code:
Open Extensions
Select PowerShell extension
Click the Manage cog-wheel (bottom-right corner)
Click Install Another Version... from the menu
Choose a version you feel comfortable with.
Note: I highly recommend running VS Code elevated (run as Administrator) to ensure installation of new extensions run smoothly.
Hope this helps.

vs code not opening up in windows

whenever i try to open my vs code editor, nothing happens it doesn't launch and even there are no errors..!! And i am confused what's wrong here in my vs code. Please anyone help me fix it..!!
Below are the verbose command i typed in the terminal..
C:\Users\Avinash>code . --verbose
[main 2020-05-10T05:17:56.317Z] Error: UNKNOWN: unknown error, mkdir
[main 2020-05-10T05:17:56.318Z] Lifecycle#kill()
[main 2020-05-10T05:17:56.320Z] [File Watcher (node.js)] Error: UNKNOWN: unknown error, stat 'c:\Users\Avinash Maurya\AppData\Roaming\Code\User'
no need of Unistalling, just go to your vscode-setup and reinstall it. (by this procedure all of your's settings, files , extensions etc.. will be restored as it is.)
I also came across the same issue.
Uninstalling and Reinstalling it again worked out and all my extensions were there already(that was strange).
You may want to try "Run as Administrator".
try code --no-sandbox in kali linux
try this it worked for me!
got to the Microsoft store
install vs code form there
then an error massage will appear
now try to open your vs code and wait ...
You can try by searching vs code and if it opens you can right click it, create the shortcut and use it instead of the old shortcut. This worked for me so please try it.
Here is the best solution:
No need to uninstall or do anything.
I was also facing the same issue. Go to task manager. You'll see that visual studio code is running. Select it and press end task. Now you can open vscode normally. It's fixed!
Somehow I had two vs code installs on my computer (one user and one system) and they appeared to be conflicting. I uninstalled user and everything worked. I suggest uninstalling all versions and reinstalling using the system installer executable.
Just reinstall the vs code from previously downloaded setup, everything including extensions get restored. enjoy coding
I Have Got the Same Problem as you just open the folder where you have downloaded VS Code. Like in My case its in Drive C and open from icon in that folder.
you can fix this issue by selecting run this program as administrator under compatibility tab.
If you are on win10, kill all vscode processes, delete folder 'C:\Users\xxx\AppData\Roaming\Code', and launch vscode again.
if anyone is still wondering abt it, Microsoft ended support for Windows 7 in January, 2020 and no longer provides security updates. VS Code desktop versions starting with 1.71 (August 2022) will no longer run on Windows 7 and you will need to upgrade to a newer Windows version to use later versions of VS Code.
Thus, if you want to keep windows 7 version, you have to download an older version than 1.71 of VS Code , for example, 1.69 version (https://www.filepuma.com/download/visual_studio_code_64bit_1.69.1-32681/) and uncheck all the auto updates from the settings.
whenever you want to add any extension, you just have to choose the older version of it.
If you cannot open the vs code editor on windows 7, then you need to download the latest version 1.70.2 from July 2022, which is supported by windows 7. Here is a link as an example: https://update.code.visualstudio.com/1.70.2/win32-x64/stable

vscode is not working properly after introduction of remote WSL feature

If I disable or uninstall Remote WSL plugin on VScode cursor starts jumping from one place to another. what should i do to avoid this from happening. I don't want to use the plugin.
I have installed WSL so VScode always prompts to install the plugin.
I had multiple code formatter that's why this was happening. remote WSL has nothing to with this problem. sorry for wrong question.

VSCode system-wide installation warning

These days, anytime I start VSCode, I get this warning
You are running the system-wide installation of Code, while having the user-wide distribution installed as well. Make sure you're running the Code version you expect.
Please how do I fix that?
UPDATE (Recommended by #Fabio Turati)
Just uninstalling the older one without the (USER) extension, it seems working. If not, then uninstall the one left and reinstall vscode.
additional reading:
You installed the new one (with USER extension) before uninstalling the older one. So now you have both, and this is why you get that message. You need to uninstall them both, then reinstall vs code. Make sure you add a shortcut on desktop, it took me a few more minutes to find the .exe of vs code. No worries you don't lose anything by uninstalling...
cheers !
You probably have both versions installed (like I do).
To get rid of the warning, make sure you open the user-wide version. That means unpinning the one you used to have from everywhere.
Then use windows (10) search: visual studio code . Only the ' user-wide distribution' gets shown. If you open visual studio code that way, the warning is gone.
i had these installed:
uninstalled the first one and that error message is gone.
The new executable of the "user-wide distribution" is in this location by default:
C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\Code.exe
Replacing your shortcuts with this one should make sure you are using the new installation. (You can also uninstall the old one of course if you want to)
Run into this issue today but all I did was install the new one one (with user extension) and then after successful installation I uninstalled the the old one. Restart my computer and all seems to be ok.
I magically solved by (using windows 10):
Unpin from "taskbar" the vs code shortcut
Remove the shortcut from desktop also if you have it
Search on cortana "visual studio code", once the app appears right click and select "pin to taskbar"
Open tha vs code app from taskbar and the error should be gone.

Extension host terminated unexpectedly

VSCode Version: 1.11.2
OS Version: Win 8.1
Below error is appearing every 10 mins.Can you please tell me how to get rid of this? I have installed only 4 extensions as shown below.
Update:
I have disabled all extensions one by one for the workspace.But still, It has the same issue.In other words, this is not the problem of extensions which I have installed.Any idea?
This worked for me.
Shift + Command + P (Control for windows)
Select Reload With Extensions disabled
Shift + Command + P again
Select Enable All Extensions
Restart VS code.
I solved this by uninstalling Live Server extension!
Open the Devtools console and look for any exceptions in localProcessExtensionHost.ts.
Uninstall the extension that shows up there.
To open developer tools:
ctrl+shift+p Developer: Toggle Developer Tools
select console.
For me, it was the Spell Right extension that messed thing up!
Just uninstalled it and restarted.
Ran into the same issue and ended up uninstalling and installing VSCode, GitBash multiple times.
Finally the issue was the antivirus which was continuously repairing the file at below location and deleting it.
Folder location - C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node
File name - extensionHostProcess.js
Hope it helps if someone ran into the issue.
I also had same issue with VS code 1.44.0 at last Friday.
Today i tried uninstall VS code in control panel and install 1.43.2 or latest version 1.44.1 and the issue was gone.
The solution: uninstall VS code and install previous version or new latest version
I had the same issue and solved it by disable all "live" extensions: live server, live chat and Chat (Chat for vscode) then reload it and it works perfectly ! :-)
extensions to disable
When it occurs with Live Sass Compiler, you may be importing a file that has not yet been created or is pointing the wrong way.
For me, I had to uninstall Angular-Essentials. It's an extensions bundle.