

Debugging should be working! You can step through your code, set breakpoints, view variables, etc.You’ll want to make sure that /home//./ gets mapped to /var/www/html You should get a popup asking for mapping of the host-side files to the in-container files. Visit the project with a web browser or curl.Set a breakpoint on or near the first line of your index.php.Click the Xdebug listen button on PhpStorm (the little phone icon) to make it start listening.

When you have everything working you can turn it back on again.

Until that’s all working it doesn’t help to go farther. Start with a working DDEV/WSL2 setup as described in DDEV ❤️ WSL2: getting started.I tested these approaches on an 8GB Windows 10 Home VM with Docker 2.3.0.3 and DDEV v1.14.2 and the Ubuntu 20.04 distro.

We’ll walk through both of these approaches. PhpStorm works fine this way, but it’s yet another complexity to manage and requires enabling X11 (easy) on your Windows system. Enabling X11 on Windows and running PhpStorm inside WSL2 as a Linux app.Running PhpStorm in Windows as usual, opening the project on the WSL2 filesystem at \\wsl$\ PhpStorm is slow to index files and is slow to respond to file changes in this mode.However, it is possible right now to use PhpStorm with DDEV on WSL2 in two different ways: The performance is incredible (on a par with native Linux installations) and the WSL2 command-line environment is fresh and clean.Īs noted in the WSL2 blog article, Visual Studio Code is doing great with WSL2, but PhpStorm is lagging a bit behind. WSL2 with DDEV is a wonderful new world for Windows developers.
