Browse Source

+ support with profiler option for xdebug3

master
dimti 4 months ago
parent
commit
a244fec29a
  1. 1
      dockerfiles/php-fpm/xdebug3/xdebug.ini
  2. 9
      dockerfiles/php-fpm/xdebug3/xdebug.sh

1
dockerfiles/php-fpm/xdebug3/xdebug.ini

@ -1,3 +1,4 @@
xdebug.mode=off
xdebug.discover_client_host=1
xdebug.start_with_request=yes
xdebug.output_dir=/tmp/profiler

9
dockerfiles/php-fpm/xdebug3/xdebug.sh

@ -31,7 +31,14 @@ xdebug_start ()
# And uncomment line with xdebug extension, thus enabling it
ON_CMD="sed -i 's/^;zend_extension=/zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"
MODE_DEBUG_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=debug/g' /usr/local/etc/php/conf.d/xdebug.ini"
if [[ -n "${WITH_PROFILER}" ]]; then
XDEBUG_MODE='profile'
else
XDEBUG_MODE='debug'
fi
MODE_DEBUG_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=${XDEBUG_MODE}/g' /usr/local/etc/php/conf.d/xdebug.ini"
docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}"

Loading…
Cancel
Save