Skip to content

Instantly share code, notes, and snippets.

@claar
Created September 20, 2014 02:52
Show Gist options
  • Save claar/f1a76670de5e2016b683 to your computer and use it in GitHub Desktop.
Save claar/f1a76670de5e2016b683 to your computer and use it in GitHub Desktop.
Easy PHP CLI debugging
##### /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