Skip to content

Instantly share code, notes, and snippets.

Avatar

Carsten Windler carstenwindler

View GitHub Profile
@carstenwindler
carstenwindler / xdebug.sh
Last active Sep 10, 2020
Bash script to quickly enable / disable xdebug in a PHP docker container
View xdebug.sh
#!/usr/bin/env bash
# see https://carstenwindler.de/php/enable-xdebug-on-demand-in-your-local-docker-environment/
if [ "$#" -ne 1 ]; then
SCRIPT_PATH=`basename "$0"`
echo "Usage: $SCRIPT_PATH enable|disable"
exit 1;
fi
# Expects service to be called app in docker-compose.yml