1 - First install `xDebug` in the Workspace and the PHP-FPM Containers:
1 - First install `xDebug` in the Workspace and the PHP-FPM Containers:
<br>
<br>
a) open the `docker-compose.yml` file
a) open the `.env` file
<br>
<br>
b) search for the `INSTALL_XDEBUG` argument under the Workspace Container
b) search for the `WORKSPACE_INSTALL_XDEBUG` argument under the Workspace Container
<br>
<br>
c) set it to `true`
c) set it to `true`
<br>
<br>
d) search for the `INSTALL_XDEBUG` argument under the PHP-FPM Container
d) search for the `PHP_FPM_INSTALL_XDEBUG` argument under the PHP-FPM Container
<br>
<br>
e) set it to `true`
e) set it to `true`
It should be like this:
2 - Re-build the containers `docker-compose build workspace php-fpm`
```yml
workspace:
build:
context:./workspace
args:
-INSTALL_XDEBUG=true
...
php-fpm:
build:
context:./php-fpm
args:
-INSTALL_XDEBUG=true
...
```
2 - Open `laradock/workspace/xdebug.ini` and `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
```
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=0
; NOTE: The dockerhost is your vEthernet (DockerNAT) IP
xdebug.remote_host=dockerhost
```
3 - Re-build the containers `docker-compose build workspace php-fpm`
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.