VSCode + Remote-WSL and the file link from Ray #79
Replies: 2 comments
-
It's a bit frustrating too that there seems to be no way to open something in the already open window. Should you or anybody responding to this issue can provide the right url to do it, let me know, I'll implement it immediately. |
Beta Was this translation helpful? Give feedback.
-
Well over a year+ later I discovered we have a solution using Custom URL option in the Editor section of settings: VSCode on windows 10/11 using wsl2 and VSCode remote WSL extension, the correct Custom URL is:
Note: you need to replace 'Ubuntu-20.04' with your actual linux distro. Thank you for the Custom URL option, makes life a bit easier being able to click over from ray to my editor correctly. |
Beta Was this translation helpful? Give feedback.
-
All of you who are using WSL with VSCode (Remote-WSL), I start this discussion so we can gather related updates in one place and hopefully one day all components will work nicely together for a convenient dev environment.
Background:
Opening a folder stored on a WSL drive in VSCode (Remote-WSL) from a windows app requires the following syntax:
vscode://vscode-remote/wsl+distro/path/to/directory
Following this logic to open the ray.php config file on line 9, one would think we would be able to use
vscode://vscode-remote/wsl+ubuntu/home/myuname/mydevdir/myproject/ray.php:9
The only problem here is that VSCode Remote-WSL was not coded to open files with the above syntax, only directories. There was a feature request but it was declined due to lack of interest from users:
microsoft/vscode#108257
The closest I could get to achieve something similar was to use the regular windows style file path to wsl and put the following into mu ray.php config:
This tho still triggers the VSCode warning window and opens the Ray link in a new regular VSCode window, not in the already open VSCode Remote-WSL window.
Curious if anyone using a similar setup could find something better.
Beta Was this translation helpful? Give feedback.
All reactions