bashsupport-pro icon indicating copy to clipboard operation
bashsupport-pro copied to clipboard

WSL UNC path support

Open xbb opened this issue 5 years ago • 2 comments

For example I have a project open (in Windows) with this WSL UNC path:

\\wsl$\Ubuntu-20.04\home\xbb\someproject

I had trouble running/debugging the scripts with the default run configuration because wsl.exe interpreter doesn't understand this kind of paths.

Is this something that you can fix with the "WSL" path mapping option?

For the moment I solved with a simple wrapper to wsl.exe that parses the arguments and looks for strings that begin with \\wsl$\…, strips the prefix and swaps the slashes.

Thanks

xbb avatar Sep 10 '20 15:09 xbb

As you noticed, \\wsl$ network paths aren't well supported at this time. It should be possible to improve things for that kind of setup. There are a few difficulties, because the network path links into a specific distribution. Also, executing is limited to WSL Bash inside that container, run configurations which link to other interpreters will fail to run. I'll look into this, but can't promise atm when this will ship with an update.

Have you installed more than one distribution in WSL or are you always using a single distribution?

jansorg avatar Sep 10 '20 17:09 jansorg

I do have more than one distribution installed however I just use the same one 99% of the time.

I strip the name of the distribution too with the wrapper, just \\wsl$\ and everything that's after until another slash \, but I'm not sure if that can cause other issues.

The wrapper works fine for my use case, so it's not urgent or needed at all that you fix it, the plugin is already awesome as it is

xbb avatar Sep 10 '20 18:09 xbb

Version 3.0 (released today) is supporting projects located in the WSL filesystem, see https://www.bashsupport.com/manual/remote-development/#alternatives-to-remote-development-on-windows for details

jansorg avatar Nov 08 '22 18:11 jansorg