Skip to content

Instantly share code, notes, and snippets.

@pollin14
Last active July 27, 2017 17:43
Show Gist options
  • Save pollin14/32755d1d7cfdc07f884b16f6d54eae01 to your computer and use it in GitHub Desktop.
Save pollin14/32755d1d7cfdc07f884b16f6d54eae01 to your computer and use it in GitHub Desktop.
Command to debug a php script with PHPStorm
## Execute a command with the current environment extended
##
## The PHP_IDE_CONFIG set the serverName with the value defined in PHPStorm's server seccion. With this value PHPStorm
## will not create a new server each time that lisen a new connection. The value does not affect the debug or listening
## of PHPStorm so, you can omite it securely.
##
## The second variable XDEBUG_CONFIG must be have the same value that its equivalent value in *-xdebug.ini.
##
## Set the remote ip in *-xdebug.ini is also required.
env PHP_IDE_CONFIG="serverName=vagrant" XDEBUG_CONFIG="idekey=vagrant" php shell/indexer.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment