Debugging di PHP con Eclipse e XDebug
Jump to navigation
Jump to search
- PDT 2.0.0.0
- Ubuntu 8.10
Installazione XDebug
- Installare Xdebug
sudo apt-get install php5-xdebug
- Configurare, altrimenti il debug non rispetta i breakpoint:
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
- PHP Development Tools Project
- PHP Development Tools (PDT) - Downloads
- Debugging PHP in Eclipse using XDebug « Techmania
- PDT Documents
- All Eclipse resources that cover "PHP"