diff --git a/.env b/.env index 9affb93f53..7cbb06145a 100644 --- a/.env +++ b/.env @@ -17,9 +17,22 @@ LOCAL_DIR=src # The PHP version to use. Valid options are 'latest', and '{version}-fpm'. LOCAL_PHP=latest -# Whether or not to enable XDebug. +# Whether or not to enable Xdebug. LOCAL_PHP_XDEBUG=false +## +# The Xdebug features to enable. +# +# By default, the following features are enabled in the local environment: +# - Development helpers (`develop`). +# - Step debugging (`debug`). +# +# To generate a code coverage report, `coverage` mode must be active. +# +# For a full list of accepted values, see https://xdebug.org/docs/all_settings#mode. +## +LOCAL_PHP_XDEBUG_MODE=develop,debug + # Whether or not to enable Memcached. LOCAL_PHP_MEMCACHED=false diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index f1b08567cd..a6dc207563 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -19,6 +19,7 @@ env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} LOCAL_PHP: '7.4-fpm' LOCAL_PHP_XDEBUG: true + LOCAL_PHP_XDEBUG_MODE: 'coverage' LOCAL_PHP_MEMCACHED: ${{ false }} jobs: diff --git a/docker-compose.yml b/docker-compose.yml index 060fd130e9..efcd0cd5c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,7 @@ services: environment: - LOCAL_PHP_XDEBUG=${LOCAL_PHP_XDEBUG-false} + - XDEBUG_MODE=${LOCAL_PHP_XDEBUG_MODE-develop,debug} - LOCAL_PHP_MEMCACHED=${LOCAL_PHP_MEMCACHED-false} - PHP_FPM_UID=${PHP_FPM_UID-1000} - PHP_FPM_GID=${PHP_FPM_GID-1000}