Skip to content

Instantly share code, notes, and snippets.

@fracasula
Last active September 26, 2017 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fracasula/d34bc61ed2c1fd0908a4c416c739e1fd to your computer and use it in GitHub Desktop.
Save fracasula/d34bc61ed2c1fd0908a4c416c739e1fd to your computer and use it in GitHub Desktop.
PHP Xdebug script for having debugging features available quickly on demand
#!/bin/bash
# Copy this file on /usr/loca/bin/xdebug and test your PHP configuration with "xdebug -i | grep -i xdebug"
XDEBUG_CONFIG="idekey=PHPSTORM" php \
-dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` \
-dxdebug.remote_enable=On \
-dxdebug.remote_connect_back=On \
-dxdebug.remote_port=9000 \
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment