Skip to content

Instantly share code, notes, and snippets.

@ngocphamm
Created December 23, 2020 20:10
Show Gist options
  • Save ngocphamm/76dbc368ebe7c52dc0621184efe713fc to your computer and use it in GitHub Desktop.
Save ngocphamm/76dbc368ebe7c52dc0621184efe713fc to your computer and use it in GitHub Desktop.
XDebug 3 config for on-demand step debugging
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.trigger_value=killdabugs
xdebug.log=/usr/local/var/log/xdebug.log
function phpdebug() {
#export XDEBUG_MODE=debug
export XDEBUG_SESSION=killdabugs
export XDEBUG_TRIGGER=killdabugs
#export XDEBUG_CONFIG="discover_client_host=1 client_host=127.0.0.1"
php $1
#unset XDEBUG_MODE
unset XDEBUG_SESSION
unset XDEBUG_TRIGGER
#unset XDEBUG_CONFIG
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment