docs
docs copied to clipboard
export XDEBUG_SESSION="PHPSTORM" doesn't initiate listening in PhpStorm
- Ubuntu 20.04
- Lando v3.14.0
- Drupal 10
Using Lando + PhpStorm + Xdebug, Manual initiation with https://drupal10.lndo.site?XDEBUG_SESSION_START=lando works well, and PhpStorm grabs focus, showing me the variables at the break point.
But I am also trying to initiate PhpStorm and Xdebug from the CLI, but can't make this method work:
export XDEBUG_SESSION="PHPSTORM"
I added this in index.php and verified that xdebug.trigger_value isn't set:
xdebug_info();
exit;
The value of the variable does not matter unless you have set up a trigger value with xdebug.trigger_value.
From https://xdebug.org/docs/step_debug#activate-debugger-cmd
.lando.yml
name: drupal10
recipe: drupal10
config:
webroot: web
services:
appserver:
# Difference from? xdebug: true
xdebug: develop,debug
overrides:
environment:
# Support debugging CLI with XDEBUG.
PHP_IDE_CONFIG: "serverName=appserver"