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.
Ibn Saeed says
Is it possible to use DBG with Netbeans ?
David says
I’m not sure about that. But getting XDebug working in Netbeans is really easy. Have you tried that yet?
Ibn Saeed says
Hello David,
Thanks for replying to my comment.
Yes i have tried Xdebug and it works splendidly.
My issue is that I am using a Shopping Cart which uses Zend Optimizer, and Xdebug does not run together with Zend Optimizer but DBG does run with Zend.
So I am only able to debug my shopping cart via DBG and not with Xdebug as I have to disable Zend, which disables my Shopping cart as well.
It is only for this reason that I am not able to use Netbeans.
David says
I understand where the problem is, but i’m afraid i don’t have the answer. If someone knows the answer, please leave a comment. Thanks.
BTW, are you debugging locally remotely?
Ibn Saeed says
im debugging locally.
ima smartarse says
fix your shopping cart? 😀
Ian Abercrombie says
Problem with XDebug is it simply doesn’t work reliably enough to be useful. If you want to examine a variable or add a watch is crashes. Just look at the forums and you will see they are FULL of problems with XDebug that are not fixed.