+ support with profiler option for xdebug3

This commit is contained in:
2023-12-19 17:31:02 +03:00
parent eb64cd702a
commit a244fec29a
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -31,7 +31,14 @@ xdebug_start ()
# And uncomment line with xdebug extension, thus enabling it # 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" 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 "${ON_CMD}"
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}" docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}"