Skip to content

Instantly share code, notes, and snippets.

@ArsSirek
Created April 6, 2018 08:42
Show Gist options
  • Save ArsSirek/e8bd977f185860ae36a8c72c9daba13e to your computer and use it in GitHub Desktop.
Save ArsSirek/e8bd977f185860ae36a8c72c9daba13e to your computer and use it in GitHub Desktop.
php xdebug remoute cli phpstorm sample with different php.ini
# credits:
# @link https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+CLI+scripts+with+PhpStorm
# @link https://stackoverflow.com/questions/2288612/how-to-trigger-xdebug-profiler-for-a-command-line-php-script
# just escaped the row, to be able to add it to bash aliases and added a part to separate debug cli php.ini from production one
alias xphp="XDEBUG_CONFIG=\"idekey=PHPSTORM\" PHP_IDE_CONFIG=\"serverName=serverD\" php -c /etc/php/7.2/cli/php.debug.ini -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d \"=\" -f 2 | awk '{print $1}'` -dxdebug.remote_connect_back=0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment