Skip to content

Instantly share code, notes, and snippets.

@travist
Last active August 29, 2015 14:02
Show Gist options
  • Save travist/5659115914b9bdd4ba26 to your computer and use it in GitHub Desktop.
Save travist/5659115914b9bdd4ba26 to your computer and use it in GitHub Desktop.
Installing xdebug on Ubuntu.

Install xdebug with PECL.

sudo pecl install xdebug

Create the following file @ /etc/php5/conf.d/xdebug.ini

zend_extension = /usr/lib/php5/20090626/xdebug.so
xdebug.remote_host = 127.0.0.1
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.remote_autostart=1
xdebug.idekey=PHPSTORM
xdebug.remote_log="/tmp/xdebug.log"

Restart apache...

sudo service apache2 restart

Now SSH into that server using the following command.

ssh -R 9000:localhost:9000 [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment