Ubuntu
sudo apt-get install php5-xdebug
CentOS, Fedora, RHEL, etc.
yum install php-pecl-xdebug.x86_64
Mac OSX using Homebrew
brew tap josegonzalez/homebrew-php
brew install php55-xdebug
Windows
Download .dll files
from http://xdebug.org/download.php
Compile from source
wget http://xdebug.org/files/xdebug-2.3.2.tgz
tar -xvf xdebug-2.3.2.tgz
cd xdebug-2.3.2
phpize && ./configure && make
sudo cp modules/xdebug.so /usr/lib/php5/20121212/
Wizard
Paste your phpinfo() here:
http://xdebug.org/wizard.php
; /etc/php5/mods-available/xdebug.ini
zend_extension=xdebug.so
[xdebug]
xdebug.remote_host=localhost
xdebug.remote_connect_back=0
xdebug.remote_enable=1
xdebug.remote_autostart = 0
xdebug.default_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.idekey=”netbeans-xdebug”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger = 1
; /etc/php5/mods-available/xdebug.ini
zend_extension=xdebug.so
[xdebug]
xdebug.remote_host=192.168.1.234
xdebug.remote_connect_back=0
xdebug.remote_enable=1
xdebug.remote_autostart = 0
xdebug.default_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.idekey=”netbeans-xdebug”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger = 1
; /etc/php5/mods-available/xdebug.ini
zend_extension=xdebug.so
[xdebug]
xdebug.remote_host=192.168.56.1
xdebug.remote_connect_back=0
xdebug.remote_enable=1
xdebug.remote_autostart = 0
xdebug.default_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.idekey=”netbeans-xdebug”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger = 1
; /etc/php5/mods-available/xdebug.ini
zend_extension=xdebug.so
[xdebug]
; xdebug.remote_host=localhost
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_autostart = 0
xdebug.default_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.idekey=”netbeans-xdebug”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger = 1
; ~/.bashrc
export XDEBUG_CONFIG="idekey=netbeans-xdebug"
; ~/.bashrc
export XDEBUG_CONFIG="profiler_enable=1"
; Or
alias phpx='XDEBUG_CONFIG="profiler_enable=1" php'
#!/bin/sh
# Set-up a tunnel
ssh -R 9000:localhost:9000 username@dev.example.com