Created
September 20, 2014 02:52
-
-
Save claar/f1a76670de5e2016b683 to your computer and use it in GitHub Desktop.
Easy PHP CLI debugging
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
##### /etc/php5/mods-available/xdebug-local.ini ##### | |
xdebug.remote_autostart = on | |
##### /home/claar/bin/pdbg ##### | |
#!/bin/bash | |
db=$1 | |
usage () { | |
echo "Usage: `basename $0` on|off" | |
echo " Turn local php debugging on or off " | |
exit 2 | |
}; | |
case "$1" in | |
on) | |
sudo php5enmod -s cli xdebug-local | |
;; | |
off) | |
sudo php5dismod -s cli xdebug-local | |
;; | |
*) | |
usage | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment