Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WP CLI + Xdebug
# Add this to /config/bash_profile
function wpd {
export XDEBUG_CONFIG="idekey=VVVDEBUG remote_connect_back=1"
wp "$@"
# 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
Copy link

iandunn commented Jun 10, 2020

That worked for me, thanks!

If anyone's looking for profiling rather than debugging, this looks like it'd work:

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