Skip to content

Instantly share code, notes, and snippets.

@mehdichaouch
Created December 3, 2020 14:35
Show Gist options
  • Save mehdichaouch/a077b629abd42437c5a08103c24de280 to your computer and use it in GitHub Desktop.
Save mehdichaouch/a077b629abd42437c5a08103c24de280 to your computer and use it in GitHub Desktop.
Quick setup for Xdebug
#!/bin/bash
yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_connect_back = 1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_port = 9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.scream = 0" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.show_local_vars = 1" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.idekey = PHPSTORM" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.max_nesting_level=1024" >> /usr/local/etc/php/conf.d/xdebug.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment