Skip to content

Instantly share code, notes, and snippets.

@stopfstedt
Last active August 29, 2015 14:22
Show Gist options
  • Save stopfstedt/280b0caaad73a60cf91a to your computer and use it in GitHub Desktop.
Save stopfstedt/280b0caaad73a60cf91a to your computer and use it in GitHub Desktop.
5/28/15: Debugging PHP with XDebug
# http://blog.jetbrains.com/webide/2012/03/new-in-4-0-easier-debugging-of-remote-php-command-line-scripts/
export PHP_IDE_CONFIG='serverName=local.placebeet'
# http://stackoverflow.com/a/17429641/307333
export XDEBUG_CONFIG='idekey=PHPSTORM'
{
"folders":
[
{
"path": "."
}
],
"settings":
{
"xdebug": {
// local env
/*
"url": "http://local.placebeet/",
"super_globals": true,
"close_on_stop": true
*/
// remote env
"url": "http://placebeet.com",
"path_mapping": {
"/var/www/sites/placebeet": "/home/stefan/dev/projects/placebeet"
},
"super_globals": true,
"close_on_stop": true,
"break_on_start": true
}
}
}
ssh -R 9000:localhost:9000 user@host
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.trace_enable_trigger=1
xdebug.profiler_enable_trigger=1
;xdebug.cli_color=1
;xdebug.scream=1
;xdebug.max_nesting_level=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment