简体   繁体   中英

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.

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: .."

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM