Skip to content

Commit

Permalink
chore: simplifies XDebug toggling in Lando
Browse files Browse the repository at this point in the history
  • Loading branch information
Genyus committed Nov 25, 2024
1 parent e36b691 commit 8b0b557
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
18 changes: 14 additions & 4 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ config:
php: '8.2'
via: apache
webroot: web
xdebug: true
xdebug: false
config:
php: .lando/config/php/php.ini
# Multisite networks must have each site listed below to work under lando
Expand Down Expand Up @@ -57,8 +57,18 @@ tooling:
npm:
service: appserver
# https://github.com/lando/lando/issues/1668#issuecomment-772829423
xdebug:
description: Loads XDebug in the selected mode.
xdebug-on:
service: appserver
description: Enable Xdebug.
user: root
cmd:
- appserver: /app/.lando/scripts/xdebug.sh
- docker-php-ext-enable xdebug && kill -USR2 $(pgrep -o php-fpm) > /dev/null || /etc/init.d/apache2 reload
- tput setaf 2 && echo "Xdebug On" && tput sgr 0 && echo

xdebug-off:
service: appserver
description: Disable Xdebug.
user: root
cmd:
- rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && kill -USR2 $(pgrep -o php-fpm) > /dev/null || /etc/init.d/apache2 reload
- tput setaf 1 && echo "Xdebug Off" && tput sgr 0 && echo
13 changes: 0 additions & 13 deletions .lando/scripts/xdebug.sh

This file was deleted.

2 changes: 0 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"name": "Listen for XDebug (Lando)",
"type": "php",
"request": "launch",
"hostname": "127.0.0.1",
"port": 9003,
"log": false,
"pathMappings": {
"/app/": "${workspaceFolder}/",
},
Expand Down

0 comments on commit 8b0b557

Please sign in to comment.