Skip to content

Instantly share code, notes, and snippets.

@carltondickson
Created March 13, 2015 11:39
Show Gist options
  • Save carltondickson/c4be6fe89197cc2c8c86 to your computer and use it in GitHub Desktop.
Save carltondickson/c4be6fe89197cc2c8c86 to your computer and use it in GitHub Desktop.
Turn on xdebug via the CLI
# Assuming the following xdebug.ini is used
zend_extension=xdebug.so
xdebug.default_enable=0
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_autostart=0
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.max_nesting_level=200
# The following will turn on xdebug for the request
/usr/bin/php -dxdebug.remote_autostart=1 -dxdebug.default_enable=1 random_file.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment