Skip to content

Commit 0ad191d

Browse files
committed
(chore): termos do xdebug mudaram
1 parent 24c8a33 commit 0ad191d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

apache-run.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
if [[ ${XDEBUG_ENABLED} == true ]]; then
44
sudo rm -f /usr/local/etc/php/conf.d/xdebug.ini || true
5-
echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-${PHP_BUILD_DATE}/xdebug.so" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
5+
echo "zend_extension=xdebug.so" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
66
echo "xdebug.var_display_max_depth=5" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
77
echo "xdebug.idekey=${XDEBUG_IDEKEY}" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
8-
echo "xdebug.remote_enable=1" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
9-
echo "xdebug.remote_port=${XDEBUG_REMOTE_PORT}" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
8+
echo "xdebug.mode=debug" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
9+
echo "xdebug.client_port=${XDEBUG_REMOTE_PORT:-$XDEBUG_CLIENT_PORT}" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
1010

11+
export XDEBUG_AUTOSTART=${XDEBUG_AUTOSTART:-$XDEBUG_START_WITH_REQUEST}
1112
[[ ${XDEBUG_AUTOSTART} == true ]] && {
12-
echo "xdebug.remote_autostart=on" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
13-
} || echo "xdebug.remote_autostart=off" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
13+
echo "xdebug.start_with_request=yes" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
14+
} || echo "xdebug.start_with_request=no" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
1415

16+
export XDEBUG_CONNECT_BACK=${XDEBUG_CONNECT_BACK:-$XDEBUG_DISCOVER_CLIENT_HOST}
1517
[[ ${XDEBUG_CONNECT_BACK} == true ]] && {
16-
echo "xdebug.remote_connect_back=1" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
17-
} || echo "xdebug.remote_connect_back=0" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
18+
echo "xdebug.discover_client_host=1" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
19+
} || echo "xdebug.discover_client_host=0" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
1820
fi
1921

2022
if [[ ${NR_ENABLED} == true ]]; then

0 commit comments

Comments
 (0)