lando / backdrop

The Official Backdrop Lando Plugin
https://docs.lando.dev/backdrop/
GNU General Public License v3.0
1 stars 5 forks source link

rebuild fails to add xdebug to php #22

Closed danksearle closed 7 months ago

danksearle commented 1 year ago

I proved this with a simple Backdrop setup. I check if xdebug is added to php each time by checking the output from phpinfo in the browser, via a simple PHP page. After a "lando destroy", the first "lando rebuild" adds xdebug correctly. If I then run "lando rebuild" again, it fails to add xdebug to PHP. If I run "lando restart", then it does add xdebug correctly. Running "lando rebuild" again will break xdebug again.

My test site file structure is this:

.lando.yml
.vscode
 - launch.json
 - php.ini
public_html
 - phpinfo.php

.lando.yml

name: testxdebug
recipe: backdrop
config:
  webroot: public_html
  php: 7.4
  xdebug: false
  config:
    php: .vscode/php.ini
services:
  appserver:
    webroot: public_html
    xdebug: true

php.ini

[PHP]

; Xdebug
xdebug.max_nesting_level = 256
xdebug.show_exception_trace = 0
xdebug.collect_params = 0
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_host = ${LANDO_HOST_IP}
xdebug.log = /tmp/xdebug.log
pfrenssen commented 1 year ago

You have xdebug: false in your configuration, this disables Xdebug. Try setting it to xdebug: true. Ref https://docs.lando.dev/php/config.html#using-xdebug

reynoldsalec commented 7 months ago

Going to close this out unless there are more questions!