PHP
Enable and configure Xdebug
To enable and configure xdebug you need to set the following environments variables:
- XDEBUG_IDE_KEY=PHPSTORM
- XDEBUG_MODES=develop,debug,profile
- XDEBUG_FORCE_DISPLAY_ERRORS=1
- XDEBUG_SHOW_ERROR_TRACE=On
- XDEBUG_CLIENT_HOST=host.docker.internal
- XDEBUG_CLIENT_PORT=9003
- XDEBUG_OUTPUT_DIR=/usr/local/apache2/htdocs/xdebug
- XDEBUG_LOG=/usr/local/apache2/htdocs/xdebug/xdebug.log
- XDEBUG_START_WITH=trigger
Docker compose
You might want to add this line to your service in the docker-compose :
extra_hosts:
- "host.docker.internal:host-gateway"
Additional environment variables (default values):
- INI_DISPLAY_ERRORS=ON
- INI_LOG_ERRORS=ON
- INI_HTML_ERRORS=OFF
- INI_MEMORY_LIMIT=128M
- INI_MAX_EXECUTION_TIME=30
- POST_MAX_SIZE=8M