bref icon indicating copy to clipboard operation
bref copied to clipboard

xdebug for php runtimes

Open anto-acube opened this issue 3 years ago • 2 comments

Hello, why is xdebug enabled only for fpm runtimes? It would be great to have it on php runtimes too, to debug easily complex event-driven functions

anto-acube avatar Feb 11 '22 09:02 anto-acube

If I recall correctly we needed a "fpm-dev" image (to work locally) so we had the opportunity to add xdebug in there (without impacting the "real" images).

We don't have such an image for "function", so that's at least why we are in this situation.

mnapoli avatar Feb 13 '22 20:02 mnapoli

You can work around this by building your own local image and copying the xdebug extension

FROM bref/php-81:1.5.3

COPY --from=bref/extra-redis-php-81:0.11 /opt/bref-extra /opt/bref-extra

COPY --from=bref/extra-xdebug-php-81:0.11 /opt/bref-extra /opt/bref-extra
COPY --from=bref/extra-xdebug-php-81:0.11 /opt/bref/ /opt/bref

COPY --from=bref/extra-gmp-php-81:0.11 /opt/bref-extra /opt/bref-extra
COPY --from=bref/extra-gmp-php-81:0.11 /opt/bref/ /opt/bref

When you build this image it's almost as if you were including the xdebug layer onto your local image. You would then need to mount your source code as volume into your image.

deleugpn avatar Feb 15 '22 23:02 deleugpn