首页 > 解决方案 > 我无法使用 xdebug 配置lando

问题描述

我正在尝试使用 Lando Drupal 站点设置 Xdebug。我尝试了很多不同的lando 配置,但无论我做什么,我都无法让xdebug 出现在我的phpinfo 中。我目前的配置是:

name: content-engine-1
recipe: pantheon
config:
  framework: drupal8
  site: content-engine-1
  id: bdfe297a-e96b-401d-b932-158854085e0e
  xdebug: true
  php: .lando.php.ini
services:
  appserver:
    xdebug: true
    overrides:
      environment:
        PHP_IDE_CONFIG: "serverName=appserver"

这是 .lando.php.ini 文件

xdebug.remote_enable=true
xdebug.remote_host="127.0.0.1"
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_log="/var/tmp/xdebug.log"
xdebug.remote_autostart=true

这是 phpinfo() 的输出: phpinfo output

标签: xdebuglando

解决方案


基于文档https://docs.lando.dev/config/php.html#configuration 它应该是

name: content-engine-1
recipe: pantheon
config:
  framework: drupal8
  site: content-engine-1
  id: bdfe297a-e96b-401d-b932-158854085e0e
  xdebug: true
  config:
     php: .lando.php.ini

推荐阅读