Skip to content

Instantly share code, notes, and snippets.

@chris-huffman
Last active January 22, 2021 20:29
Show Gist options
  • Save chris-huffman/8cec4246be2140f345cb5a0fef7aac5e to your computer and use it in GitHub Desktop.
Save chris-huffman/8cec4246be2140f345cb5a0fef7aac5e to your computer and use it in GitHub Desktop.
Debugging from Vagrant CLI
# Generic example
export PHP_IDE_CONFIG="serverName=<host.lan>" && php -d xdebug.remote_autostart=on -f <somefile>.php -- <any PHP file CLI arguments>
# bin/magento example
export PHP_IDE_CONFIG="serverName=<host.lan>" && php -d xdebug.remote_autostart=on -f bin/magento -- <bin:magento:command> <any bin/magento command line arguments>
#### OLD WAY ####
# Debug magerun:
export PHP_IDE_CONFIG="serverName=smkw.dev" && php-debug -f /usr/local/bin/mr sys:cron:run amasty_analytics_collect
# Debug bin/magento:
export PHP_IDE_CONFIG="serverName=smkw.dev" && php-debug -f bin/magento -- setup:upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment