Created
February 24, 2021 09:49
-
-
Save mahype/655828a134549ef41bc5a863bbac17e5 to your computer and use it in GitHub Desktop.
Xdebug switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PHP_INI_LOCATION=$(php -r 'echo php_ini_loaded_file();') | |
if [ "$1" = "on" ]; | |
then | |
`sed -i '' 's/^;zend_extension/zend_extension/g' $PHP_INI_LOCATION` | |
echo "Xdebug on in ${PHP_INI_LOCATION}" | |
valet restart | |
elif [ "$1" = "off" ]; | |
then | |
`sed -i '' 's/^zend_extension/;zend_extension/g' $PHP_INI_LOCATION` | |
echo "Xdebug off in ${PHP_INI_LOCATION}" | |
valet restart | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment