Last active
August 29, 2015 14:22
-
-
Save stopfstedt/280b0caaad73a60cf91a to your computer and use it in GitHub Desktop.
5/28/15: Debugging PHP with XDebug
Ubuntu:
sudo apt-get install php5-xdebug
at a minimum:
zend_extension=xdebug.so
xdebug.remote_enable=1
This file contains hidden or 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
# 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' |
This file contains hidden or 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
Show hidden characters
{ | |
"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 | |
} | |
} | |
} |
This file contains hidden or 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
ssh -R 9000:localhost:9000 user@host |
This file contains hidden or 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
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