Skip to content

Commit e6a76dc

Browse files
author
Giuseppe Morelli
committed
add script to install xdebug from source
1 parent ba0888d commit e6a76dc

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
zend_extension=/opt/xdebug/modules/xdebug.so
2+
3+
xdebug.remote_enable= on
4+
xdebug.force_display_errors=1
5+
xdebug.force_error_reporting=1
6+
xdebug.cli_color=1
7+
xdebug.var_display_max_children=-1
8+
xdebug.var_display_max_data=1024
9+
xdebug.var_display_max_depth=50
10+
xdebug.max_nesting_level=1000
11+
xdebug.idekey=DOCKERGM
12+
xdebug.remote_connect_back = on
13+
; xdebug.remote_autostart=1
14+
; xdebug.remote_host=<host with IDE>
15+
; xdebug.remote_host=172.16.250.1
16+

local/env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ REDIS_COMMANDER_HOSTS=db0:redis-server:6379:0,db1:redis-server:6379:1
136136
################################################################################
137137

138138
# Possibile values: "off,develop,coverage,debug,gcstats,profile,trace"
139+
# see https://xdebug.org/docs/all_settings#mode
139140
XDEBUG_MODE=off
140141
XDEBUG_SESSION=DOCKERGM
141142
XDEBUG_CONFIG=client_port=9000
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# downgrade to xdebug 2.9
6+
apt-get remove --purge php-xdebug -y
7+
cd /opt/
8+
git clone https://github.com/xdebug/xdebug.git xdebug
9+
cd xdebug
10+
git checkout 2.9.8
11+
phpize
12+
./configure --enable-xdebug
13+
make
14+
make install
15+
16+
# replace xdebug 3 with xdebug 2 config
17+
cp /var/www/html/docker/local/config/php/7.3/mods-available/xdebug-custom.ini /etc/php/7.3/mods-available/xdebug-custom.ini
18+
rm /etc/php/7.3/apache2/conf.d/90-xdebug-3.ini
19+
rm /etc/php/7.3/cli/conf.d/90-xdebug-3.ini

0 commit comments

Comments
 (0)