[xdebug]
;zend_extension=/usr/lib/php5/20121212/xdebug.so
; This is for local debugging
; xdebug.remote_host=127.0.0.1
; xdebug.remote_connect_back=0
; This is for virtual host (cli)
; xdebug.remote_host=192.168.56.1
; xdebug.remote_connect_back=0
; This is for remote debugging
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_cookie_expire_time=86400
xdebug.remote_port=9000
xdebug.idekey=”netbeans-xdebug”
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/tmp
xdebug.profiler_output_name=cachegrind.out.%p.%R.%r
If it is set to 0, we can not debug at all
If it is set to 1, we can not debug simpletest test cases
$response = \file_get_contents('http://dev.gocatalyze.com/crm/people');
If it is set to 0, we can not debug from console, but we can overcome it
bash, shell:
vim ~/.bashrc
export XDEBUG_CONFIG="idekey=netbeans-xdebug"
exec bash
fish:
vim ~/.config/fish/config.fish
set -x XDEBUG_CONFIG "idekey=netbeans-xdebug"
exec fish
sudo service apache2 restart (if needed)
If it is set to 0, we have to make sure our local machine's ip is static and does not change every time we start debug session
If we want to wait for a long time before press 'Continue' button, we have to set it to a big number
Not available in netbeans for PHP, but we can do it manually
if ($var == 123 || in_array($item, $array)) {
// breakpoint goes below.
$a = 'b';
}