Design News

Install Xdebug Debugger to Eclipse PDT – Tutorials

Posted by:  /  Tags: , , , , ,  /  Comments: 2

These are  instructions to install Xdebug debugger to Eclipse PDT IDE using wamp or xampp PHP. They accompany the video tutorials Here.

First start wamp server or(xampp). I am using wampserver 2.0h
Put it onlne and start all services. Load up the localhost page. Determine what version of PHP you have on the PHPinfo page.
Determine and copy the loaded php.ini file path from the phpinfo page. (should be in the first section)
I am running PHP 5.2.9 for this tutorial.
Head over to xdebug.org or download the xdebug files from the links below. 

VC9 is for IIS. You need to download xdebug VC6.

 For PHP 5.2.x : [www.xdebug.org] http:www.xdebug.org/files/php_xdebug-2.0.5-5.2.dll
 For PHP 5.3.x : [www.xdebug.org] http:www.xdebug.org/files/php_xdebug-2.0.5-5.3-vc6.dll

 Rename file php_xdebug.dll

 In php.ini, use this first line according to your PHP version :
 For PHP 5.2.x : zend_extension_ts=”D:/wamp/bin/php/php5.2.9-2/php_xdebug.dll”
 For PHP 5.3.x : zend_extension=”D:/wamp/bin/php/php5.3.0/php_xdebug.dll”
 
  [XDebug] 
 zend_extension_ts=”D:/wamp/bin/php/php5.2.9-2/php_xdebug.dll”
 xdebug.remote_enable=true
 xdebug.remote_host=127.0.0.1
 xdebug.remote_port=9000
 xdebug.remote_handler=dbgp

 Put php_xdebug.dll in the php folder
 Don’t put this file in ext folder else it would appear in wamp php extensions submenu,
 and may cause a problem if included as an extension. (despite what some of the other tuttorials are stating) 
 Restart all services in wamp control panel apache webserver and test phpinfo() page check for debugger. 

install xdebug eclipse pdt ide

 If yes continue to eclipse setup, if no go back and try again. There is no point in continuing till you get that line in your phpinfo.

 create a Test PHP Project
 Create a PHP file
 copy some PHP code into page to test the debugger on
 Go to window/preferences/PHP/Debug 
open setup Debugger see image below:

install xdebug eclipse pdt ide

 then got to setup the PHP executable Path (usually it is in your php folder. file is called php-cgi.exe)
For example my php-cgi.exe file is in this folder:
D:\wamp\bin\php\php5.2.9-2\php-cgi.exe

See Pic below:

xdebug install eclipse pdt ide

 Thats it restart eclipse.

Still having a hard time watch the install tutorial videos. Here.

VisualMagick

2 Comments

harry devanney

November 16, 2010

arrow

Yes, an excelent tutroial!
It was the final step which every other tutorial, I’ve read, failed to mention and subsequently the reason why I have been pulling my hair out!
Thank you.

Brett Widmann

January 17, 2011

arrow

This looks worth my while! I’m really glad I found this.

Leave a Reply

Your Name: (required)

Your Email: (will not be published) (required)

Your Website:

Your Message:

submit comment