Debugging di PHP con Eclipse e XDebug: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 48: Line 48:


==Configurazione PDT==
==Configurazione PDT==
*[http://www.eclipse.org/pdt/ PHP Development Tools Project]
*[http://www.eclipse.org/pdt/downloads/ PHP Development Tools (PDT) - Downloads]
*[http://www.eclipse.org/pdt/downloads/ PHP Development Tools (PDT) - Downloads]
* [http://techmania.wordpress.com/2008/07/02/debugging-php-in-eclipse-using-xdebug/ Debugging PHP in Eclipse using XDebug « Techmania]
* [http://techmania.wordpress.com/2008/07/02/debugging-php-in-eclipse-using-xdebug/ Debugging PHP in Eclipse using XDebug « Techmania]
*[http://www.eclipse.org/pdt/docs.php PDT Documents]
*[http://www.eclipse.org/resources/?sort=date&category=PHP All Eclipse resources that cover "PHP"]
*[http://www.eclipse.org/resources/?sort=date&category=PHP All Eclipse resources that cover "PHP"]
==Tutorial==
*[http://live.eclipse.org/node/352 PHP Development Tools (PDT) 1.0 Overview | Eclipse Live]

Latest revision as of 22:32, 18 July 2009

  • PDT 2.0.0.0
  • Ubuntu 8.10

Installazione XDebug

  • Installare Xdebug
sudo apt-get install php5-xdebug
sudoedit /etc/php5/conf.d/xdebug.ini 
zend_extension=/usr/lib/php5/20060613+lfs/xdebug.so
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
  • Riavviare Apache
sudo invoke-rc.d apache2 restart
  • Controllare i parametri in phpinfo()
PHP Version 5.2.6-2ubuntu4.2
...
Debug Build 	no
Thread Safety 	disabled 
...
with Xdebug v2.0.3
...
xdebug.remote_autostart	Off	Off
xdebug.remote_enable	On	On
xdebug.remote_handler	dbgp	dbgp
xdebug.remote_host	localhost	localhost
xdebug.remote_log	no value	no value
xdebug.remote_mode	req	req
xdebug.remote_port	9000	9000
...
  • Controllo assenza ZendDebugger: se ci fosse, va in conflitto
php -i | grep ^extension_dir
extension_dir => /usr/lib/php5/20060613+lfs => /usr/lib/php5/20060613+lfs

sudo rm /usr/lib/php5/20060613+lfs/ZendDebugger.so
sudo invoke-rc.d apache2 restart

Configurazione PDT

Tutorial