|
@ -31,16 +31,10 @@ 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" |
|
|
REMOTE_AUTOSTART_CMD="sed -i 's/^xdebug.remote_autostart=0/xdebug.remote_autostart=1/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
REMOTE_ENABLE_CMD="sed -i 's/^xdebug.remote_enable=0/xdebug.remote_enable=1/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
PROFILER_ENABLE_CDM="sed -i 's/^xdebug.profiler_enable=0/xdebug.profiler_enable=1/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
|
|
|
MODE_DEBUG_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=debug/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 "${REMOTE_AUTOSTART_CMD}" |
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_ENABLE_CMD}" |
|
|
|
|
|
if [[ ! -z "${WITH_PROFILER}" ]]; then |
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${PROFILER_ENABLE_CDM}" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_DEBUG_CMD}" |
|
|
docker restart $PHP_FPM_CONTAINER |
|
|
docker restart $PHP_FPM_CONTAINER |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v' |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v' |
|
|
} |
|
|
} |
|
@ -52,14 +46,10 @@ xdebug_stop () |
|
|
|
|
|
|
|
|
# Comment out xdebug extension line |
|
|
# Comment out xdebug extension line |
|
|
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini" |
|
|
OFF_CMD="sed -i 's/^zend_extension=/;zend_extension=/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini" |
|
|
REMOTE_AUTOSTART_CMD="sed -i 's/^xdebug.remote_autostart=1/xdebug.remote_autostart=0/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
REMOTE_ENABLE_CMD="sed -i 's/^xdebug.remote_enable=1/xdebug.remote_enable=0/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
PROFILER_DISABLE_CMD="sed -i 's/^xdebug.profiler_enable=1/xdebug.profiler_enable=0/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
|
|
|
MODE_OFF_CMD="sed -i 's/^xdebug.mode.*/xdebug.mode=off/g' /usr/local/etc/php/conf.d/xdebug.ini" |
|
|
|
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}" |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${OFF_CMD}" |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_AUTOSTART_CMD}" |
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${REMOTE_ENABLE_CMD}" |
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${PROFILER_DISABLE_CMD}" |
|
|
|
|
|
|
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c "${MODE_OFF_CMD}" |
|
|
# docker-compose restart php-fpm |
|
|
# docker-compose restart php-fpm |
|
|
docker restart $PHP_FPM_CONTAINER |
|
|
docker restart $PHP_FPM_CONTAINER |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v' |
|
|
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v' |
|
|