Debugger are full-featured PHP debugger engine. They are interactive tools that allows
you to debug PHP scripts locally or remotely, from an IDE or from the console. There is 3
debugger on the market, XDEBUG (open source) , ZEND (closed source), DBG (commercial
but source code available) by luck all are free :-)
I recommend you to develop with Eclipse PDT: The Eclipse Foundation has released the 1.0
of the Eclipse PHP Development Tools (PDT) project. Eclipse PDT is a set of tools and
frameworks that enhance the productivity of developers using PHP, a popular, general-purpose
dynamic language that is especially suited for development of web applications and web services.
I have prepared a HowTo also for eclipse PDT, but it is still not ready for prime time.
DBG
| |
XDEBUG
| Xdebug provides:
|
ZEND
Debugger Extension can be downloaded from Zend Downloads
| Zend debugger in Eclipse also works for MySQL statements! |
The Zend Executable Debugger Eclipse plugin adds PHP debugging capabilities to the Eclipse environment.
Add the following remote location to the eclipse manager, even if you have eclipse PDT
http://downloads.zend.com/pdt
You'll have to configured the PHP binary included with the ZEND debugger to be able to debug SQL queries. Search for a PHP.ini in your eclipse/plugins directory, you'll find 2 files.
Ex:
And add these line in one of these files according to your PHP version
extension_dir = "xampp_path/php/ext"
extension="xampp_path/php/ext/php_mysql.dll"
extension="xampp_path/php/ext/php_mysqli.dll"
include_path =".;xampp_path/php;"
Please note that the Zend Executable Debugger is not available from the Eclipse PDT update Manager, so download ZEND debugger (Free) from Zend Downloads, you must extract the zip ZendDebugger-5.2.12-cygwin_nt-i386.zip.
In the zip file, you'll see multiple directories
Use the version that match the one in XAMPP (you have note at chapter A, for me 5.2.3 so copy files from 5_2_x_comp) and copy the dll in
xampp_path\php\extensions\
Open the file php.ini located at xampp_path\apache\bin\php.ini
and add these keys if they do not already exist:
[XDebug]
;; Only Zend OR (!) XDebug
;zend_extension_ts="\xampp\php\ext\php_xdebug.dll"
zend_extension_ts="\xampp\php\extensions\ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
; this is to see output while debugging implicit_flush = On
Switch off all other debugger as it may conflict with Zen
eaccelerator.enable="0"
;extension=dbg.dll
:extension=xdebug.dll
Restart apache, check for proper operations by going to http://localhost
| Note |
| Apache will crash if you have more than one key in php.ini with the name zend_extension_ts, so uncomment all other entries! |
Go to Debug dialog for creating and managing run configurations
As seen in the screen shot below
Now click on button configure
Go to tab "Path Mapping"
Confirm all windows, and you can now start the debugger by clinking on debug button
You're done, you can now set breakpoint and debug Joomla! or your code easily
Attention: the root workspace must be located at xampp_path/htdocs
In the PHP perspective of eclipse, go to the menu debug
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.