Setting XDebug to work with Eclipse...

You can use whatever IDE, supporting debugging environment to debug PHP, but the two very popular IDEs for PHP that support XDebug are NetBeans and Eclipse. Both of these are very popular for other programming languages such as Java. Here, we will define the settings for Eclipse IDE to work with XDebug do debug PHP that work. Here is the content of the php.ini file.

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example
;
extension=/usr/lib64/php/modules/mysql.so
zend_extension=/usr/lib64/php/modules/xdebug.so

xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.idekey=ECLIPSE_DBGP
xdebug.remote_mode=req 
xdebug.remote_host=localhost
xdebug.remote_log=/root/debug

For NetBenas the idkey may be like this:

xdebug.idekey="netbeans-xdebug"

Please note the idkeys may not be hardcoded, you may update them via IDE settings.

Here is one great asset for PDT Eclipse developers.

Here is xdebug official data.

tags: & category: -