Skip to content

Instantly share code, notes, and snippets.

@Nikschavan
Forked from hacfi/disable-xdebug.sh
Last active April 23, 2019 19:16
Show Gist options
  • Save Nikschavan/0222875b8ca913d19a10773c40764ca6 to your computer and use it in GitHub Desktop.
Save Nikschavan/0222875b8ca913d19a10773c40764ca6 to your computer and use it in GitHub Desktop.
OS X Homebrew php 7.1 enable/disable Xdebug extension script - https://www.nikhilchavan.com/2017/04/enable-disable-xdebug-quickly-os-x-homebrew-php-7-1/
#!/bin/sh
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
sudo brew services restart php71
echo "xdebug disabled"
#!/bin/sh
sed -i.default "s/^;zend_extension=/zend_extension=/" /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
sudo brew services restart php71
echo "xdebug enabled"
@Nikschavan
Copy link
Author

Nikschavan commented Jan 10, 2017

curl -L https://gist.githubusercontent.com/Nikschavan/0222875b8ca913d19a10773c40764ca6/raw/8aecb01f11d12c58afdeb6a77505d780b8cd8313/disable-xdebug.sh -o /usr/local/bin/disable-xdebug
curl -L https://gist.githubusercontent.com/Nikschavan/0222875b8ca913d19a10773c40764ca6/raw/8aecb01f11d12c58afdeb6a77505d780b8cd8313/enable-xdebug.sh -o /usr/local/bin/enable-xdebug
chmod +x /usr/local/bin/*able-xdebug

@zvermafia
Copy link

What about php 7.2?

There is no any homebrew files in the ~/Library/LaunchAgents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment