
Моя конфигурация:
20-xdebug.ini
[XDebug]
zend_extension = xdebug.so
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.discover_client_host = true
xdebug.idekey = PHPSTORM
xdebug.client_host = host.docker.internal
xdebug.client_port = 9003
.env
# Xdebug
SAIL_XDEBUG_MODE=develop,debug,coverage
SAIL_XDEBUG_CONFIG="client_host=laravel.test"
часть compose.yaml
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.4
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
MYSQL_CLIENT: mariadb-client
image: sail-8.4/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
IGNITION_LOCAL_SITES_PATH: '${PWD}'
volumes:
- '.:/var/www/html'
- './20-xdebug.ini:/etc/php/8.4/cli/conf.d/20-xdebug.ini'
networks:
- sail
depends_on:
- mariadb
- redis
- mongodb
- elasticsearch
Подробнее здесь: https://stackoverflow.com/questions/798 ... ail-xdebug
Мобильная версия