Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@rpayanm
Copy link

@rpayanm rpayanm commented Jul 18, 2025

I followed the current doc and it did not work xdebug with drush, this blog post worked:
https://www.drupalarchitect.info/articles/xdebug-3-settings-debugging-drush-scripts-lando-phpstorm

XDebug 3 settings for debugging drush scripts in lando with PHPStorm

.lando.yml

config:
  xdebug: "debug,develop"

SSH into the lando box and run export XDEBUG_SESSION=drush. That will set up php commands to trigger xdebug and phpstorm will catch the connection.

@netlify
Copy link

netlify bot commented Jul 18, 2025

Deploy Preview for lando-core failed. Why did it fail? →

Name Link
🔨 Latest commit 5963a7d
🔍 Latest deploy log https://app.netlify.com/projects/lando-core/deploys/6881160ad3f30f0008fba6e7

@rpayanm
Copy link
Author

rpayanm commented Jul 23, 2025

I have been investigating this further because with Drupal 10 I was able to debug using Drush versions earlier than 13 with the above configuration, but with Drupal 11 (Drush version 13 or later), I was not able to do so.

This resources helped me:
https://xdebug.org/docs/step_debug#activate-debugger-cmd
https://www.drush.org/13.6.0/commands/#xdebug

Now, the following setup works for both Drupal 10 and Drupal 11:

PHP_IDE_CONFIG="serverName=lando"
XDEBUG_SESSION=1
DRUSH_ALLOW_XDEBUG=1

I am updating the pull request accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant