From aedb02c0af6430ccf00845c2ad523269a00c93a1 Mon Sep 17 00:00:00 2001 From: mhawwari Date: Mon, 7 Jun 2021 15:15:29 +0300 Subject: [PATCH] Add xDebug configuration (#104) * #103 - Add xDebug configuration * Create .lando folder * Add xdebug info in README.md * Rearrange README.md points Co-authored-by: mhawwari --- .lando.yml | 3 +++ .lando/.php.ini | 13 +++++++++++++ README.md | 13 ++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .lando/.php.ini diff --git a/.lando.yml b/.lando.yml index 65a833360..88937ec7b 100644 --- a/.lando.yml +++ b/.lando.yml @@ -11,6 +11,9 @@ services: - "composer global require drupal/coder dealerdirect/phpcodesniffer-composer-installer mglaman/drupal-check phpunit/phpunit" - 'export PATH="/var/www/.composer/vendor/bin"' - "wget https://asm89.github.io/d/twig-lint.phar -P /var/www" + xdebug: true + config: + php: .lando/.php.ini node: type: node build: diff --git a/.lando/.php.ini b/.lando/.php.ini new file mode 100644 index 000000000..270e5f77a --- /dev/null +++ b/.lando/.php.ini @@ -0,0 +1,13 @@ +[PHP] + +; Xdebug +xdebug.max_nesting_level = 256 +xdebug.show_exception_trace = 0 +xdebug.collect_params = 0 +; Extra custom Xdebug setting for debug to work in VSCode. +xdebug.mode = debug +xdebug.client_host = ${LANDO_HOST_IP} +xdebug.client_port = 9003 +xdebug.start_with_request = trigger +; xdebug.remote_connect_back = 1 +xdebug.log = /tmp/xdebug.log diff --git a/README.md b/README.md index 08665f7e9..8c32a6b85 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,6 @@ composer create-project vardot/varbase-project:9.0.x-dev PROJECT_DIR_NAME --stab ## [Automated Functional Testing](https://github.com/Vardot/varbase/blob/9.0.x/tests/README.md) -1. Install lando locally, steps for installing can be found [here](https://docs.lando.dev/basics/installation.html). -2. Run lando start. - ## [Varbase 9.0.x Developer Guide](https://docs.varbase.vardot.com) ## [CHANGELOG for Varbase](https://github.com/Vardot/varbase/blob/9.0.x/CHANGELOG.md) @@ -36,3 +33,13 @@ composer create-project vardot/varbase-project:9.0.x-dev PROJECT_DIR_NAME --stab ## [CHANGELOG for Varbase](https://github.com/Vardot/varbase/blob/9.0.x/CHANGELOG.md) ## [General instructions on how to update Varbase](https://github.com/Vardot/varbase/blob/9.0.x/UPDATE.md) + +## Local development with Lando + +1. Install Lando locally, steps for installing can be found [here](https://docs.lando.dev/basics/installation.html). +2. Run Lando start. + +## Debugging using Lando + +- xDebug is enabled on Lando by default for PHP debugging. +- The debugger is set to listen for the port 9003 but can be changed in .lando/.php.ini