Install phpdbg (#1612)

* Install phpdbg
* Change documentstion
This commit is contained in:
Eugene Kirdzei 2018-06-30 11:54:46 +03:00 committed by Shao Yu-Lung (Allen)
parent eccc149f45
commit a1e01ac19b
5 changed files with 52 additions and 0 deletions

View File

@ -297,6 +297,28 @@ e) set it to `true`
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm. For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
<br>
<a name="Install-phpdbg"></a>
## Install phpdbg
Install `phpdbg` in the Workspace and the PHP-FPM Containers:
<br>
1 - Open the `.env`.
2 - Search for `WORKSPACE_INSTALL_PHPDBG`.
3 - Set value to `true`
4 - Do the same for `PHP_FPM_INSTALL_PHPDBG`
```dotenv
WORKSPACE_INSTALL_PHPDBG=true
```
```dotenv
PHP_FPM_INSTALL_PHPDBG=true
```
<a name="Setup remote debugging for PhpStorm on Linux"></a> <a name="Setup remote debugging for PhpStorm on Linux"></a>
## Setup remote debugging for PhpStorm on Linux ## Setup remote debugging for PhpStorm on Linux

View File

@ -50,6 +50,7 @@ services:
- PHP_VERSION=${PHP_VERSION} - PHP_VERSION=${PHP_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP} - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
@ -116,6 +117,7 @@ services:
args: args:
- PHP_VERSION=${PHP_VERSION} - PHP_VERSION=${PHP_VERSION}
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP} - INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}

View File

@ -87,6 +87,7 @@ WORKSPACE_INSTALL_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false WORKSPACE_INSTALL_SUBVERSION=false
WORKSPACE_INSTALL_XDEBUG=false WORKSPACE_INSTALL_XDEBUG=false
WORKSPACE_INSTALL_PHPDBG=false
WORKSPACE_INSTALL_LDAP=false WORKSPACE_INSTALL_LDAP=false
WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_SOAP=false
WORKSPACE_INSTALL_IMAP=false WORKSPACE_INSTALL_IMAP=false
@ -132,6 +133,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
PHP_FPM_INSTALL_PHPREDIS=true PHP_FPM_INSTALL_PHPREDIS=true
PHP_FPM_INSTALL_MEMCACHED=false PHP_FPM_INSTALL_MEMCACHED=false
PHP_FPM_INSTALL_XDEBUG=false PHP_FPM_INSTALL_XDEBUG=false
PHP_FPM_INSTALL_PHPDBG=false
PHP_FPM_INSTALL_IMAP=false PHP_FPM_INSTALL_IMAP=false
PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_MONGO=false
PHP_FPM_INSTALL_AMQP=false PHP_FPM_INSTALL_AMQP=false

View File

@ -109,6 +109,18 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \ sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
###########################################################################
# Phpdbg:
###########################################################################
ARG INSTALL_PHPDBG=false
ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
;fi
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################

View File

@ -245,6 +245,20 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${P
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \ sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
###########################################################################
# Phpdbg:
###########################################################################
USER root
ARG INSTALL_PHPDBG=false
ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
;fi
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################