How to set up Xdebug + Laradock on Linux?
Laradock (https://laradock.io/) is popular way of general Docker configuration for web applications. Although Laradock has wide settings, some packages are not easy to configure..
Xdebug is a popular PHP debugger. To know more about the debugger, please check this link: https://xdebug.org/
To configure Xdebug on Laradock you need to pass such steps:
1) Go to .env file in Laradock and set WORKSPACE_INSTALL_XDEBUG, PHP_FPM_INSTALL_XDEBUG equal TRUE!
2) Go to laradock/php-fpm folder and edit file “xdebug.ini”. In this file you need to set xdebug.remote_host=”172.17.0.1".
3) Go to laradock/workspace folder and edit file “xdebug.ini”. In this file you need to set xdebug.remote_host=”172.17.0.1".
Build and restart laradock:
* docker-compose build -no-cache php-fpm
* docker-compose build -no-cache workspace
* docker-compose up -d