What is the best way of integrating Webstorm and WSL/Bash on Windows (Creators Update, Ubuntu 16.04)?

With the latest changes to WSL in Windows 10 Creators Update, to what is the current extent of integration between Webstorm (and other JetBrains IDE's) and Bash on Windows?  I've grown accustomed to working on MacOS and was hoping for this sort of tighter integration, but my previous attempts (pre-Creators Update) left me quite underwhelmed.  Are there any updated best practices for setting up a seamless workflow (e.g. node, git, webstorm terminal, debugging, running, and all the rest)?  Thanks in advance for any advice. 


WebStorm doesn't provide any specific support for WSL, and no best practices are available.

there is currently no way to use native ubuntu versions of npm, node, bower, etc (https://youtrack.jetbrains.com/issue/WEB-22794) and Git (https://youtrack.jetbrains.com/issue/IDEA-172253)


One specific issue seems to be in the way the WSL tools open files vs how Webstorm (at least on Windows) does. If there is a WSL tool running that is "listening" to a file for changes and then WS changes it, both sides get confused and/or broken. For example running a JS test continually that listens for changes: WS tries to update the file but can't; meanwhile the WSL tool either sees the filename changed below it or just sees a new temp file created, and then "dies", with neither side recovering until the test is stopped, the file is resaved, and the test manually restarted (which can be a very lengthy process). The same issue happens if both are trying to manage (at least git) version control, likely for the same reasons; only with that, it gets so corrupted you have to re-clone the repo. It would be nice if some compatibility setting could be added (if a compatible way of reading & saving files was determined). The likelihood of it being fixed in WSL is, um, "low". Hope this helps shed more light on the issue.


Please try disabling 'Use "Safe write"' in File | Settings | Appearance & Behavior | System Settings - does it make things any better?


Hey Elena,

That seems to have done the trick -- at least regarding editing code; haven't checked if git behavior is better/different.





Thanks for the info and tips, you guys. I'll try disabling safe write and post back here. Thoughts on any possible negative repercussions of doing this?


with the safe write setting "on" we write file content to new file, then remove the file and do rename of new file to old file. This creates a temporary backup of the file, which may help in case of crashes/abnormal program termination... But I'd say that turning it off is safe :)


Hi Elena and others, I hope it's not too late to add to this discussion 8 months later.

Now we are living and working after the 2017 Fall Creators Update of Windows 10, and some Jetbrains help articles are out of date, because WSL is out of beta, is almost a one-click install from "Turn Windows Features on or off", and no longer requires "developer mode". OpenSSL in WSL is still at (beta, i think) as of this writing, and will be much better fairly soon when it moves to release but I don't know the timeline.

Anyway, The main thing I want to mention for this discussion is https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/ -- that page is straight from MSDN developers and it is very clear about not working on one's WSL file system using Windows-based tools. At all.

So for now, it looks like a question of priorities: if I want a Linux work environment and Jetbrains I probably need to run a full Linux distribution in a VM or as a dual-boot (or better, instead of Windows ^_* ) and if I want Jetbrains but Windows I should give up (for now) on WSL. It seems WSL is probably going to be stuck in a CLI, non-GUI existence indefinitely since it's not intended to turn into a MacOS or compete with Windows 10.

I am curious to see others' thoughts on this.



I would strongly recommend using the setup Nick Janetakis outlines in his blog here: https://nickjanetakis.com/blog/using-wsl-and-mobaxterm-to-create-a-linux-dev-environment-on-windows

See also my comments below the line re disabling virus scan on the WLS filesystem (big I/O speed improvement) and fixing blurry screen if you get that.  

Basically this setup is about running everything from within WSL including the code and IntelliJ/WebStorm, and then using X11 to stream the display to Windows.  This runs really, really well for me so far.  Way better than VMs, duel-boot or using WSL for servers only and hosting code and IDE in Windows.

I'm running a load of Scala microservices, mongo, a python/node web server, IntelliJ and PyCharm on Ubuntu 18.04, all in WSL under WIndows.  And the IDEs look and feel great and work just like they were the windows version, correct icons, work in multi-monitors and the rest.  In fact I tried installing the windows version too and compared that to the Linux one open via MobaXterm... and remarkably the Linux one running in WSL Ubuntu felt and looked slicker than the native windows one.


Please sign in to leave a comment.