Monday, September 19, 2011

Debugging PHP in NetBeans (in Windows)


Here are the steps I used to setup PHP debugging in NetBeans (7.0 at the time of this writing).

The way to do it:  http://xdebug.org/docs/install
You will need to download the correct php_xdebug from the xdebug.org site: http://xdebug.org/download.php

I downloaded the correct DLL for my environment and followed the install instructions.  Below are my final php.ini settings:

This extension is disabled
;extension=php_xdebug.dll


[XDebug]
;; Only Zend OR (!) XDebug
;zend_extension_ts="D:\xampp\php\ext\php_xdebug.dll"
zend_extension_ts = "D:\xampp\php\ext\php_xdebug-2.1.1-5.2-vc6.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="D:\xampp\tmp"


NetBeans PHP Debug Settings
  1. Goto tools->Options
  2. Select PHP
  3. On the General tab

1 comment: