Skip to content

Instantly share code, notes, and snippets.

@beeblebrox3
Created October 23, 2017 16:58
Show Gist options
  • Save beeblebrox3/c2f2c8352847f7b83e33a70b56caa030 to your computer and use it in GitHub Desktop.
Save beeblebrox3/c2f2c8352847f7b83e33a70b56caa030 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# This script was made to facilitate debug tests and other cli running on docker
# on your editor/ide
#
# For vscode, you just have to configure the `serverSourceRoot` on your launch.json
# file.
# For phpstorm you have to create a server named `debug`.
#
# You can use this script as the php binary. Like this:
# ./debug -v
# ./debug artisan migrate:refresh
# docker exec app ./debug vendor/bin/phpunit
export PHP_IDE_CONFIG="serverName=debug"
export XDEBUG_CONFIG="idekey=debug"
export XDEBUG_CONFIG="remote_host=172.17.0.1"
php "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment