Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Debug CLI PHP on the Vagrant server
  1. Create file phpdebug
  2. chmod +x phpdebug
  3. mv phpdebug /usr/bin/phpdebug
  4. Using: phpdebug vagrant test.php phpdebug yourServerName test.php
#!/bin/bash
export PHP_IDE_CONFIG="serverName=$1"
export XDEBUG_CONFIG="idekey=PHPSTORM remote_enable=1 remote_mode=req remote_port=9000 remote_host=10.0.2.2"
php $2 $3 $4 $5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment