
- Phpstorm 9 how to#
- Phpstorm 9 windows#
Choose "Docker for Windows" or "Docker for Mac"Ĥ.
Create a server the default name is "docker", but since the "server" for each project will be different, name it for the project, for example "DDEV d9". Use the "+" to select "From Docker, Vagrant, VM."ģ.
Under File→Settings→PHP (Windows) or Preferences→PHP (macOS), click the "." to the right of "CLI Interpreter"ġ. (All you have to do here is click the little telephone to "Start listening for PHP Debug Connections", then ddev xdebug on, then visit a web page and choose the correct mapping from host to server. This will result in a PhpStorm "Server" with the proper name, normally the same as the FQDN of the project. Set up your project to do normal Xdebug, as described in the Step Debugging section. (If you're running PhpStorm inside WSL2, there are no special instructions.) In other words, in the "Open" dialog, browse to \\wsl$\Ubuntu\home\rfay\workspace\d9 (in this example). Phpstorm 9 windows#
If you're on Windows, running PhpStorm on the Windows side but using WSL2 for your DDEV project, open the project as a WSL2 project. In this example, the project name is "d9" and the site is "d9.ddev.site". WSL2 instructions are provided where necessary.
Any OS platform, but if you're using Windows PhpStorm with WSL2 the path mappings are slightly more complex. (Check version with docker-compose -version.) Use docker-compose disable-v2 to switch to docker-compose v1. Due to a bug or two in PhpStorm, it can't properly interpret docker-compose v2 output as of Sept 2021. You'll end up with PhpStorm actually using the PHP interpreter inside the ddev-webserver container of your project, and able to use composer and phpunit inside there as well. It works on macOS, Linux, Windows with WSL2 and Windows traditional. This is based on the wonderful article by Susi, and couldn't have been done without it, but since PhpStorm has fixed some things and DDEV has worked around others, this is far easier now. It works on all OS platforms, including macOS and WSL2. Phpstorm 9 how to#
This explores how to add full PhpStorm integration with a DDEV project, including composer and phpunit. PhpStorm Integration PhpStorm Configuration and Integration ¶ Full Integration with Docker, DDEV, and PhpStorm ¶ Sharing a project with `ddev share` or by exposing a port Full Integration with Docker, DDEV, and PhpStorm