Anatol
Anatol

Reputation: 301

VSCode + remote WSL some functions not working

If I open a PHP project in VSCode by right-clicking on the project folder, all the PHP functionality is working. If I hover on an object or function, I see the references, etc. If I do right click, I have many options like Go to Definition, Import Class ...

Howeever, if I open the project with Remote WSL, these functions are not working anymore, and when doing a right click, I don't have most of options that I had before. Also, the code formaters are not working.

Is there any solution to have all VSCode functions available working via Remote WSL?

My dev environment is DevilBox which is installed in Docker Container on WSL2.

Upvotes: 0

Views: 4279

Answers (2)

fchastanet
fchastanet

Reputation: 57

I just typed Code . instead of code . and it works Possibly also check that VSCode folder is in PATH variable

Upvotes: 2

Anatol
Anatol

Reputation: 301

So, I found the solution to this issue :)

In VSCode I have the extensions installed locally. In order to work in WSL, is necessary to install them in WSL as well.

When opening a WSL remote connection and clicking on Extensions, VS Code shows "Local - Installed" and "WSL: UBUNTU - Installed". The Local Installed extensions which are not available in WSL are dimmed and have a green button "Install in WSL: .."

Upvotes: 4

Related Questions