Improve bin/xdebug to use command from path.

It uses the `which` command to find the command that you actually want
to run, and runs that.

This makes it possible to run any php binary (like phpunit or phing)
with xdebug.

Signed-off-by: Jacob Kiers <jacob@alphacomm.nl>
This commit is contained in:
Jacob Kiers 2015-01-27 12:25:03 +01:00
parent ba33a48144
commit 79074be926
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash
#XDEBUG_REMOTE_HOST=`echo $SSH_CLIENT | cut -d " " -f 1`
COMMAND=`which $1`;
shift 1
PHP_IDE_CONFIG="serverName=sandbox" XDEBUG_CONFIG="idekey=PHPSTORM remote_host=127.0.0.1 remote_port=19000" php -d xdebug.remote_enable=1 "$@"
PHP_IDE_CONFIG="serverName=sandbox" XDEBUG_CONFIG="idekey=PHPSTORM remote_host=127.0.0.1 remote_port=19000" php -d xdebug.remote_enable=1 $COMMAND "$@"