To use xdebug with macOS and docker is quite, let´s call it tricky ;)
The following steps need to be proceed to get it working:
- use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off
<?php | |
/** | |
* Class Container | |
*/ | |
class Container | |
{ | |
/** | |
* @var array | |
*/ |
<?php | |
use Illuminate\Support\Facades\Config; | |
class TestCase extends Laravel\Lumen\Testing\TestCase | |
{ | |
/** | |
* Create a mock of a Storage disk. | |
* | |
* Usage: |
Dockerfile
that is based on your production image and
simply install xdebug
into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
<!doctype html> | |
<html><head><script src="app.js"></script></head><body></body></html> |