

Source Files are in a local directory, no Web server is yet configured.Open PhpStorm and click on the following: lando rebuild -y Create a new PhpStorm Project for your Drupal in Lando website: Rebuild your Drupal in Lando website in order to apply the new settings. If you plan on spinning-up both of them on the same machine at the same time, though, change the value in “name:” and “PHP_IDE_CONFIG:” of at least one of them first. lando.yml files as written, just to test things out. In fact, you could use either of the above. scripts/run-tests.sh -php /usr/local/bin/php" lando.yml configured for PhpStorm would look like the following: name: your-drupalĬmd: "php. lando.yml configured for PhpStorm would look like the following: name: your-drupalĪ complete but basic Drupal 7. lando.yml files:Ī complete but basic Drupal 8. scripts/run-tests.sh -php /usr/local/bin/php" Examples of complete Drupal 8 and Drupal 7. lando.yml file, so Lando will recognize “lando phpunit” commands.Ĭhange “web” above to match the webroot directory of your Drupal 8 in Lando website.Ĭmd: "php. PHP_IDE_CONFIG: "serverName="Ĭhange “” above to match the domain name of your Drupal in Lando website.Īdd the following to the “tooling” key of the. lando.yml file, so that Lando will include a PHP_IDE_CONFIG for PhpStorm. conf:Īdd the following to the “services” key of the. lando.yml file, so that Lando will include your new php.ini. lando.yml file for your Drupal in Lando website:Īdd the following to the “config” key of the. Inside this config directory, create a php.ini file with the following: For example, on OSX this might be: ~/Sites//config/.In the root directory of your lando project, create a “config” directory. Prepare your Drupal in Lando for PhpStorm: Create a custom php.ini for your Drupal in Lando website:

You should be reasonably familiar with the command line, as well as with the above software.NOTE: drush 9 is currently NOT supported in PhpStorm.because if you had just written your unit test before you wrote that snazzy method, like you were supposed to,…😉.Debug phpunit tests for Drupal in Lando.Debug drush commands for Drupal in Lando.Debug Drupal 8 (and 7) in Lando: a Docker-based development environment.Once you finish, you will be able to use PhpStorm to: Even a freshly-installed, blank Drupal website will do. The question I get asked most often when discussing my Lando development environment with other Drupal Web Developers is, “How do you setup Lando and PhpStorm to debug Drupal using Xdebug?” This blog post will help you do exactly that.īefore you start, you should have a Drupal website up-and-running in Lando.
