Also - my local site is based on the standard Drupal project composer template (with a nested docroot). In this example, my local site is using the Lando "Pantheon" recipe, but as you'll see in a bit, any recipe can be used. This tutorial assumes that you have a local Drupal site up-and-running in Lando and set up as a project in PhpStorm. ![]() Google Chrome with the Xdebug helper extension.This process described below is largely based on a comment in an issue thread in the Lando issue queue by David Hunt - thanks, David! As part of my evaluation of Lando, I decided to figure out how to set up local PHP debugging with Xdebug and PhpStorm on Mac OS X. One of the necessary skills for a professional Drupal developer (one who codes either modules or themes) is to be able run a solid debugging tool. ![]() Second, I'm trying to figure out what is the most ideal local development environment for students of both our 12-week Drupal Career Online class (starts March 19) and our 6-week Mastering Professional Drupal Development Workflows with Pantheon (starts February 26) courses. First, as my "daily driver" for consulting work - I've been a long-time MAMP Pro user and I've been feeling for a long time that I need to modernize my local development tools. In order to debug any Drush/Symfony or CLI command using Xdebug with PhpStorm or a similar IDE, you will need to set two additional environment variables PHP_IDE_CONFIG + XDEBUG_SESSION_START and configure the path mapping in your IDE accordingly.Over the past few months, I've been test-driving various Docker-based local development environments with two goals in mind. Lando mounts your project root to /app in the application server, so you might map something like /users/myname/myproject/ to /app.īy default, our Drupal recipes come with Drush out of the box and also the Symfony recipe has a console tooling, which can be debugged with the following config. It may also ask you to map the application server file paths to the paths on your host machine. PhpStorm should now automatically open the Debug window and produce debug output if a breakpoint is reached. Select "Debug" from the menu to tell your browser to send the appropriate parameters to Xdebug so that Xdebug activates when a request is made.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |