PHPStorm 2020.3.3 - Windows 10, WSL2 Ubuntu distro location not visible

I've installed WSL2 and Ubuntu distro, everything works fine from a Windows perspective but I can't open my code in PHPStorm - location is not visible.

 

I see my partitions, but WSL is not visible. It is visible in in Windows Explorer though: 

 

I was doing the same thing on my second PC and everything works fine there.

I've tried opening it just typing the path - it isn't working either.

Only difference between this PC and the other is: on the first (working) one, I've installed Ubuntu using Windows Store app, so it installs on C partition in %appdata%. On this one I've installed it manually on a different partition.

Could that be a source of my problem?

6 comments
Comment actions Permalink

It might be this one: https://youtrack.jetbrains.com/issue/IDEA-252213
Could you please check how it goes for you on 2021.1 RC? https://www.jetbrains.com/phpstorm/nextversion/

1
Comment actions Permalink

Well, I guess you're right Eugene Morozov. Updating to 2021.1 RC helped, I can see my distro now. Thanks! 

0
Comment actions Permalink
  • Well I have the same issue and I run latest 2021.3 Until yesterday everything was fine. After windows update and restart I can't see WSL ubuntu folder in phpstorm, but in windows explorer I can browse it and everything, also, in terminal it is accessible
0
Comment actions Permalink

Please check "wsl" related settings in the built-in IDE registry (Help > Find action > Registry), do you have the same set of enabled settings?

Also, have you checked the log file already (Help > Show log in Explorer)? Do you have any WSL-related errors there?

0
Comment actions Permalink

After checking the log file you suggested, I found these errors:

2022-04-14 07:07:54,120 [63706217]   INFO - ion.wsl.WslDistributionManager - Cannot load WSL distributions with versions: wsl.exe is not found in %PATH% 
2022-04-14 07:09:22,337 [63794434]   INFO - j.ide.actions.RevealFileAction - Exit code 1

Something def chaned - before the path was \\wsl$\Ubuntu\ , now its \\wsl.localhost\Ubuntu

UPDATE: turned out just putting C:\Windows\System32\ as value for PATH variable fixes the problem, I probably broke PATH variable at some point, since I could not restore the original value, I just put this general path.

It was not a phpStorm issue. Thank you for your help.

1
Comment actions Permalink

Thank you for the update and for sharing the solution!

0

Please sign in to leave a comment.