Developing "in" Windows Subsystem for Linux
已回答
In Visual Studio Code there is a plugin which allows you to edit projects that live in the WSL filesystem. This is extremely useful for editing projects that were built for a unix-like environment on a Windows machine.
Is there any likelyhood of bringing this sort of functionality to the IntelliJ family of IDEs?
请先登录再写评论。
@... yeah I already have that working but the application freezes when it attempts to open my large project. Might be due to the sheer size and number of files maybe?
Hi Marco Lackovic I followed the Run a Linux GUI application in WSL 2 link, however when I run phpstorm.sh in WSL 2 I get:
"Can't connect to X11 window server using '192.168.16.1:0' as the value of the DISPLAY variable."
...even though I do have XLaunch running on the Windows side.
I did install phpstorm directly from jetbrains download though, rather than following the snap / genie approach used in the link, so do you think that might account for the problem?
Bradozman yes, it could be your machine can't handle that project size. My projects are definitely much smaller and I am using an Intel Core i7 @ 1.90GHz, 32 GB of RAM, an Intel UHD Graphics 620 with an NVMe SSD.
Andy Ingham I had IntelliJ IDEA working on my machine in WSL2 both with the direct download and snap/genie approach. Your problem sounds more like firewall related: make sure you have followed the firewall settings step (step 3) in that guide you followed.
@... no it's def not my computer. Only happens in wslv2 via vcxsrv. Didn't have this problem on wsl1, Linux VMs, windows, or even on a computer from 10 years ago. I work on this project full time just crashes trying to open from ubuntu in wsl2 🤷♂️. I basically haven't bothered trying to figure it out, just using windows phpstorm and working with limited/broken features for now.
Specific support for wsl2 is planned in scope of https://youtrack.jetbrains.com/issue/IDEA-242627 request. Please feel free to vote and track its progress.
I've been using the solution of running my IntelliJ IDE in the WSL2 linux environment via a Windows X server but the files don't seem to update when external changes occur within the linux filesystem. I need to do a reload from disk to see any changes and this is essentially unusable for dev.
Does anyone know how to make this functionality work?
@Alvin do you run IDE on linux and using it on Windows via the X server? There is known issue, please vote for
https://youtrack.jetbrains.com/issue/IDEA-165228
https://youtrack.jetbrains.com/issue/IDEA-240600
@...
SO the issues I had running via vcxsrv before wasn't actually the project size.
It's happening for any project with a readme file in it and is apparently an open gl error.
`libGL error: failed to load driver: swrast`
Any time I try opening a project with a readme.md file I get this error in the terminal output and PHP storm freezes.
If anyone has any ideas please let me know.
@Bradley Hayes the hang may be caused by https://youtrack.jetbrains.com/issue/IDEA-247244 The workaround is to disable Markdown bundled plugin.
>`libGL error: failed to load driver: swrast`
Similar errors were reported in
https://youtrack.jetbrains.com/issue/IDEA-229558
https://youtrack.jetbrains.com/issue/IDEA-248509
Please try also https://github.com/openai/gym/issues/509#issuecomment-282331680 to fix them.
Andrey Dernov I couldn't resolve the display driver issues however disabling the MD plugin bundles with PhpStorm prevents it from trying to use open gl and hence prevents the crashes. Just needed to open a project with no readme file first and go uninstall the plugin.
Alvin any luck with your issue? I have same problemo.
T S No I'm still having the same issue. I believe https://youtrack.jetbrains.com/issue/IDEA-240600 covers it but I haven't seen any progress for a while.
Alvin thanks for the link, it does seem relevant. Every time I think I have the perfect setup on windows... it only ends up being that I trade one problem for another.
I'm using the current Windows EAP build and the file system performance on WSL file system does seem better now. It detects WSL php interpreter and git too but there are still issues with integrating third-party command-line tools into inspections.
I was able to successfully run linux native Intellj IDE using
You don't have to use the jetbrain-toolbox as demonstrated in this post
Simply run from within the WSL shell
and the application UI will pop as native windows application