* xdebug in workspace downgrading to 2.x version
* with profiler option in xdebug workspace starter script
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
# NOTE: At the moment, this has only been confirmed to work with PHP 7
|
||||||
|
|
||||||
PHP_VERSION=$2 # Without dot
|
PHP_VERSION=$2 # Without dot
|
||||||
|
WITH_PROFILER=$3
|
||||||
|
|
||||||
# Grab full name of workspace container
|
# Grab full name of workspace container
|
||||||
WORKSPACE_CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
WORKSPACE_CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
|
||||||
@ -12,6 +13,10 @@ if [[ -z "${WORKSPACE_CONTAINER}" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z "${WITH_PROFILER}" ]]; then
|
||||||
|
echo "With profiler option".
|
||||||
|
fi
|
||||||
|
|
||||||
xdebug_status ()
|
xdebug_status ()
|
||||||
{
|
{
|
||||||
echo 'xDebug status'
|
echo 'xDebug status'
|
||||||
|
@ -176,9 +176,8 @@ COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
|
|||||||
ARG INSTALL_XDEBUG=false
|
ARG INSTALL_XDEBUG=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
# Load the xdebug extension only with phpunit commands
|
pecl install xdebug-2.8.1 && \
|
||||||
apt-get install -y php${PHP_VERSION}-xdebug && \
|
echo ';zend_extension=xdebug.so' > /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
|
||||||
sed -i 's/^zend_extension=/;zend_extension=/g' /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
|
|
||||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user