If you’re using XAMPP and trying to get the DBG debugger loaded and working for development purposes, you should read this and this. Basically to get DBG debugger loaded when php is run in XAMPP, you got to have

1. php_dbg.dll in xampp_directory/php/ext

2. In xampp_directory/apache/bin/php.ini, comment the line starting with zend_extension_ts with a ;

3. In php.ini again, add extension=php_dbg.dll under the [extension] list

4. (Re)Start XAMPP now and check phpinfo(), you should see the following message in the header:
with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru

But that’s only part of the equation. To debug properly in PHP, you need the DBG debugger AND the DBG Listener. You can get both debugger and listener at http://www.php-debugger.com/dbg/downloads.php and some installation notes at http://www.php-debugger.com/dbg/installation.php. Now I’m not sure how you can get other IDEs to debug properly with DBG Debugger and DBG Listener (I tried doing so in HateML and gave up in vain), but since I’m using nusphere PHPEd and they have it all setup for local testing, I’m currently not worried about that (apart from the high price tag). In fact, nusphere are the ones who wrote and owns DBG debugger.

Another popular PHP debugger, XDebug, is open source and seems to be easier to use from what I’ve read so far.

Please leave a comment if you have other sources/references/experiences where you have got PHP debugging working in your IDE.