Last active
August 9, 2020 15:58
-
-
Save robbplo/cbac102b77adc3232aadc74ba239f332 to your computer and use it in GitHub Desktop.
Fish shell function for toggling Xdebug
This file contains 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
function xdebug | |
set iniFileLocation "/usr/local/etc/php/7.4/conf.d/ext-debug.ini"; | |
set currentLine (cat $iniFileLocation | grep xdebug.so) | |
if string match -r \#zend_extension $currentLine | |
sed -i -e 's/^#zend_extension/zend_extension/g' $iniFileLocation | |
echo "xdebug is now active"; | |
else | |
sed -i -e 's/^zend_extension/#zend_extension/g' $iniFileLocation | |
echo "xdebug is now inactive"; | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment