Created
October 12, 2017 23:23
-
-
Save jpcaparas/d8249ac287f40162b333f85cd5831f44 to your computer and use it in GitHub Desktop.
PHP Storm Xdebug client connect on Vagrant-installed PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# - `chmod 777 debug.sh` to make it executable | |
# - Put this file on your `/usr/bin` dir so you can call it anywhere | |
# - Rename it to `debug` | |
# - Change variables as needed | |
# Usage: debug php artisan | |
PHP_IDE_CONFIG="serverName=vagrant" \ | |
XDEBUG_CONFIG="idekey=XDEBUG" \ | |
XDEBUG_EXT_PATH="/usr/lib/php/20160303/xdebug.so" \ | |
XDEBUG_PORT="9000" | |
VAGRANT_IP="10.0.2.2" | |
$(which php) \ | |
-dzend_extension=$XDEBUG_EXT_PATH \ | |
-dxdebug.remote_enable=1 \ | |
-dxdebug.remote_port=$XDEBUG_PORT \ | |
-dxdebug.remote_autostart=1 \ | |
-dxdebug.remote_host=$VAGRANT_IP \ | |
${@} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment