

I did not get into debugging why that does not work. There is also an option to have XDebug identify the IP address of our IDE through the initial HTTP request (xdebug.remote_connect_back) but unfortunately it does not work under our current setup. I’m going to steal this Gif from XDebug website to show you how this is going to work, understanding this architecture helps you with debugging if you run into an issue during this step: To do that, we need tosetup remote debuggingfor XDebug so that PHPStorm can connect to it and set breakpoints, show variable values and step through the code. So the idea is to write PHP code in PHPStorm on Windows and run and debug PHP code on Ubuntu over WSL2.

On the Windows side, I have installedPHPStorm. On my Ubuntu on WSL2, I havedownloaded and compiled PHP 7.4.4along withXDebug 2.9.3. After following a tutorialto enable this feature, which includes joining the insider preview program (which is free), you would need to setup something like Ubuntu 18 from the Windows store. You need a build later than 18917 to enable WSL2. I’m running Windows 10 Education build 19041.172. Environment Informationīefore we go any further, it is wise to discuss what my current setup is.

But this new setup came with its own set of challenges that I’m going to discuss in this post and share my solutions with you. One week in, I’m satisfied with my decision. Specifically withWSL2andnative Docker support, I thought this would be the perfect time to give them a try. After some digging, I finally decided to go back to Windows.
Phpstorm windows drivers#
I soon noticed that my accessories and their drivers work nowhere near as smooth as they do on my Mac. But then I had to move my computer home because of all this WFH stuff. I’ve been using Ubuntu for the past couple of years. Let me start by telling you how I got here. Moreover, Docker is now fully supported making development much easier. It’s super easy to work with files from both Windows and Linux and it is much quicker than WSL 1.
Phpstorm windows full#
The significant point about WSL2 is that Windows has now switched to full virtualization to run Linux with a good level of integration between the two operating systems. This way I can make use of the “user friendly” parts and beauty of Windows while still running and debugging my code on Ubuntu. The plan is to have the development environment run from Linux (WSL2) while the IDE, which is PHPStorm in our scenario execute from Windows. At the same time, setting up extensions and compiling PHP itself on windows is not a very straightforward task as far as I know. I would like to work against the latest version of PHP and compile it myself.
Phpstorm windows how to#
I will tell you how to setup PHPStorm to debug PHP applications using XDebug and PHP setup over Ubuntu 18.04 LTS on WSL2.

In this post, I’m going to go over my short journey to setup my PHP development environment on Windows 10. Prior to this I was using Docker for Windows with the Hyper-V backend and I've noticed networking seems a little different.
Phpstorm windows install#
Hey guys, my work has finally allowed us to download and I rushed to install WSL2, Windows Terminal and Ubuntu 20.04 and configured Docker for Windows to use WSL2. Another test was to compile k8s-jcasc-management-go with a GoLang compiler on both systems. This means, that the build time was 2–3 times faster on WSL2 than under Windows native.
