真是好消息 ~
之前用的 MAMP 版本是 1.8.4, 沒有 xDebug, 現在新的版本 1.9 就內建了, 已經幫你編譯好 xDebug,
只需要打開 php.ini 加入設定內容 :
zend_extension="/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=
重新啓動 MAMP 就可以使用 xDebug, 太棒了 !
現在可以一窺大型套件的內容了, Ya!
PS : 我有試過用自己編譯 xDebug, 版本是 2.0.4, 2.0.5, 2.0, xdebug-2.1.0RC1, 這三個版本,
努力了一個下午, 不行, 所以我才使用 MAMP 1.9, 因為它內建了...
若是要自己編譯 xDebug, 要注意編譯出的編號
xDebug 官方文件說明
Q: What to do with: Xdebug requires Zend Engine API version xxxxxxxx. The Zend Engine API version 2xxxxxxxx which is installed, is newer.
A: This message means that you are trying to load Xdebug with a PHP version for which it wasn't built. If you compiled PHP yourself, it is most likely because you compiled Xdebug against PHP headers that belong to a different PHP version that you're running. For example, you're using PHP 5.3 and the headers you're using are still PHP 5.2. If you are using a pre-compiled binary, then you're using the wrong one.
To diagnose if this is your problem, make the following steps:
* Check what the "Zend Extension" API number is of the PHP version that you are running by looking at phpinfo() (or "php -i") output. You can find it in the top part of the output, in the same block as the PHP logo and the PHP version. As examples, for PHP 5.2, the number is "220060519" and for PHP 5.3 it is "220090626".
* Check what the output of "phpize" is when you're completing the compilation steps. The number that you're looking for is on the line that says "Zend Extension Api No".
If the two numbers from above do not match, you're compiling with the wrong PHP headers. Refer to the next FAQ entry to figure out which phpize to use.
更多 xDebug 說明
沒有留言:
張貼留言