2

你能告诉我,为什么我没有在 y PHP 扩展列表中获得 xDebug 扩展吗?Wamp>PHP>PHP 扩展不是 xDebug。

PHP版本:

Windows: yes - Compiler: MS VC6 - Architecture: x86
Zend Server: no
PHP Version: 5.3.5
Zend API nr: 220090626
PHP API nr: 20090626
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\wamp\bin\apache\Apache2.2.17\bin\php.ini
Extensions directory: c:\wamp\bin\php\php5.3.5\ext

The compiler (MS VC6) that this PHP was build with, is no longer supported. Please upgrade to a version that was built with MS VC9.

所以我下载:Xdebug 2.1.2, PHP 5.3 VC6 (32 bit) (MD5: adb792dc75c79384f987061f12e0934a) 将文件复制到 ext 文件夹,将此行添加到 php.ini 文件中:

[Xdebug]
zend_extension = "c:/wamp/bin/php/php5.3.5/ext/php_xdebug.dll"
xdebug.remote_enable=1

;IP
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

怎么了?

4

1 回答 1

1

这对我很好:

[XDEBUG]
zend_extension="c:/path/to/your/extensions/php_xdebug-2.1.2-5.3-vc6.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

对我来说最关键的部分是我使用zend_extension_ts而不是zend_extension.

您可能还想确保您正在更改正确的 php.ini 版本。对于命令行 PHP,可以通过运行以下命令获得:

php -i | findstr -i php.ini

查找“加载的配置文件”行。

于 2014-02-23T22:57:59.867 回答