cd /usr/bin/local
sudo wget https://gist.github.com/kibao/6192063/raw/529ca3eccda769b3111db42fb28eb4993482875b/xdebug-toggle
sudo chmod +x xdebug-toggle
sudo xdebug-toggle
#!/bin/bash | |
XDEBUG_CONF_FILE="/etc/php5/conf.d/20-xdebug.ini" | |
if [ $EUID != 0 ]; then | |
echo "[ERROR] You must be superuser" | |
echo | |
exit 1 | |
fi | |
if [ -L $XDEBUG_CONF_FILE ]; then | |
echo "Disabling xdebug" | |
php5dismod xdebug | |
else | |
echo "Enabling xdebug" | |
php5enmod xdebug | |
fi | |
service apache2 restart |