使用Eclipse調試PHP程序


我安裝的是PHP Version 5.3.26,按照網上提示在Eclipse中使用XDebug進行調試,不過配置了卻使用不了,下面把解決方法簡要說一下。

XDebug老是加載不了

From PHP 5.3 onwards, you always need to use the zend_extension PHP.ini setting name, and not zend_extension_ts, nor zend_extension_debug. However, your compile options (ZTS/normal build; debug/non-debug) still need to match with what PHP is using.

Php.ini中的配置

;debug configuration

zend_extension="D:/servers/php-5.3.8/ext/php_xdebug-2.1.3-5.3-vc9.dll"

;xdebug配置

[Xdebug] 

xdebug.remote_enable=1

xdebug.remote_host=127.0.0.1

xdebug.remote_port=9000 

xdebug.remote_handler=dbgp

xdebug.auto_trace = On

xdebug.show_exception_trace = On

xdebug.remote_autostart = On

xdebug.collect_vars = On

xdebug.collect_return = On

xdebug.collect_params = On

Eclipse配置

在eclipse的項目里的Properties里面找到"PHP Debug",在PHP Debugger里面選擇"XDebug"

再配置一下:

再在Windows->Preferences里面配置下PHP Servers


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM