2

I'm using Drupal VM and the Drush Launcher (0.6.0). Whenever I try to Xdebug, PhpStorm notices, but it never actually reaches my Drush command. It stops at running Drush. This seems to have started recently.

My command looks like:

XDEBUG_CONFIG="remote_enable=On remote_connect_back=Off remote_host=192.168.90.1" PHP_IDE_CO
NFIG="serverName=example.wizonesolutions.com" drush -l example.com module:custom-command
4

From https://github.com/drush-ops/drush-launcher#xdebug-compatibility:

Drush Launcher, like Composer automatically disables Xdebug by default. This improves performance substantially. You may override this feature by setting an environment variable. DRUSH_ALLOW_XDEBUG=1 drush [command]

So to make Xdebug reach the rest of your code, add DRUSH_ALLOW_XDEBUG=1 to the environment variables in front of your command.

  • Would you mind editing to tag with ddev as well, maybe also mention how to do it in ddev web container? You don't need all that XDEBUG_CONFIG="remote_enable=On remote_connect_back=Off remote_host=192.168.90.1" PHP_IDE_CO NFIG="serverName=example.wizonesolutions.com" drush -l example.com module:custom-command in general do you? Just the remote_anable=On? – rfay Aug 14 at 17:03
  • 1
    This one isn't ddev, as it was a Drupal VM setup. So I did need that, as it doesn't work the same way :) – wizonesolutions Aug 14 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.