morganestes
5/18/2015 - 3:33 PM

WP CLI + Xdebug

WP CLI + Xdebug

# Add this to /config/bash_profile
function wpd {
    export XDEBUG_CONFIG="idekey=VVVDEBUG remote_connect_back=1"
    wp "$@"
    unset XDEBUG_CONFIG
};
# Run these commands:
# vagrant ssh
# sudo cp /srv/config/bash_profile /home/vagrant/.bash_profile
# source ~/.bash_profile

# Use wpd instead of wp when you want to debug wp-cli commands