Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhpStorm and custom WSL #73

Closed
Geelik opened this issue Nov 10, 2020 · 6 comments
Closed

PhpStorm and custom WSL #73

Geelik opened this issue Nov 10, 2020 · 6 comments

Comments

@Geelik
Copy link

Geelik commented Nov 10, 2020

So i finally found a way to make phpstorm recognise imported WSL distribution (thanks to your tool).

I am on Windows 10
PhpStorm 2020.2.3 (using toolbox)

Steps to reproduce

  1. Follow the installation instructions BUT rename the launcher the same as one of this
// Found in AppData\Roaming\JetBrains\PhpStorm2020.2\options\wsl.distributions.xml
debian.exe
kali.exe
opensuse-42.exe
sles-12.exe
sles-15.exe
openSUSE-Leap-15.exe
ubuntu.exe
ubuntu1604.exe
ubuntu1804.exe
wlinux.exe
pengwin.exe
wle.exe
Arch.exe
openSUSE-Leap-15-1.exe

The reason for this is, all the paths for WSL executables are hard coded so even if you add a custom distribution in wsl.distributions.xml it will not work.

The name of the executable is not obligatory the same as the ditribution it run !
You can install Ubuntu with a launcher named debian.exe and it will work.

  1. Move the executable in C:\Users\USER\AppData\Local\Microsoft\WindowsApps
  2. Open or reopen Phpstorm and if all is good you can use WSL as an interpreter for PHP and nodejs

I would like people to confirm if it's working for them and maybe add it to the readme.

@yuk7
Copy link
Owner

yuk7 commented Nov 11, 2020

I have set up a new repository for wiki and documentation and decided to link from the README.
https://github.com/wsldl-pg/docs

I want you to help me edit it.
Can I invite you to the team?

@yuk7
Copy link
Owner

yuk7 commented Nov 11, 2020

But... wsl.distributions.xml really doesn't work??
https://github.com/JetBrains/intellij-community/blob/74c1c18870e3e16acfb78308b4f5052ec6246754/platform/platform-impl/src/com/intellij/execution/wsl/WSLDistributionService.java
I read the source code and it looks like wsl.distributions.xml is loaded.

@Geelik
Copy link
Author

Geelik commented Nov 11, 2020

The source you provided is for intellij-community, i don't know if phpstorm use exactly the same base. And i tried everything with wsl.distributions.xml and nothing worked that's why it would be helpfull to have feedback from other users.

As for the documentation i don't have much free time so i'll not be very active but i can help from time to time if needed.

@yuk7
Copy link
Owner

yuk7 commented Nov 11, 2020

Thank you so much!
I invited to organization.

@yuk7
Copy link
Owner

yuk7 commented Nov 11, 2020

Can you create document about this to PHPStorm.md in wsldl-pg/docs/Other-Software/ ?
Thank you.

@Geelik
Copy link
Author

Geelik commented Nov 11, 2020

Will try to do it tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants