刚开始学php,配置开发环境时要配置xdebug就在网上找了个教程配置,我用的事php5.4,但是别人教程用的是php5.3,所以人家的xdebug是php_xdebug-2.2.1-5.3-vc9.dll
所以重启Apache后并没有如教程所说的成功配置xdebug,幸亏注意到5.3和5.4这两个敏感信息,就查找了一下。原来php和xdebug版本号必须要一致,包括5.x和vcX以及是32位系统还是64位系统,如果不知道需要的xdebug版本可以到http://www.xdebug.org/download.php,将你phpinfo时的显示信息的源码COPY到输入框中,然后提交,XDebug将告诉你应该下载哪个版本。
关于xdebug扩展的存放位置要在php.ini中设置,如果没有放到对应的路径下也不能设置成功。我的路径为:
extension_dir = "H:/software/php/myext"
想要自己的版本的xdebug就到http://xdebug.org/download.php这里去下载吧
另附我的配置:
zend_extension = H:\software\php\myext\php_xdebug-2.3.2-5.4-vc9.dll
在Module Settings下面设置xdebug
[Xdebug]
xdebug.profiler_enable=on
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.collect_vars = On
重启Apache再在phpinfo信息页面,搜索发现xdebug就可以了