我正在搜索调试php脚本的方法。在互联网上,我发现我可以用MacGDBp + XDebug来做这件事。当我尝试在Shell中使用PECL安装时:
sudo pecl install xdebug
The next error have been occured:
downloading xdebug-2.4.0.tgz ...
Starting to download xdebug-2.4.0.tgz (264,832 bytes)
.....................done: 264,832 bytes
76 source files, building
running: phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
帮我找到解决那个问题的方法。
发布于 2016-04-27 10:39:11
默认情况下,XDebug是可用的。只要让它
1) sudo nano /etc/php.ini
(如果文件尚不存在,则首先使用sudo cp /etc/php.ini.default /etc/php.ini
)
2)在末尾添加这些行(用ls ls /usr/lib/php/extensions/
验证路径)
[Xdebug]
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
3)使用sudo apachectl restart
重新启动apache
( 4) php -m | grep xdebug
验证
发布于 2017-05-23 18:07:59
的出色响应几乎让xdebug使用MacOSSiera10.12与NetBeans协同工作。只需要两个更改:在步骤2中,在zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so“之后还添加xdebug.remote_enable=1
这是必要的,因为预编译的.so文件禁用了xdebug远程访问。NetBeans和其他工具需要启用它。
发布于 2018-02-02 16:39:26
为了使用xdebug进行调试,我使用了以下步骤
为了安装php72,我使用brew安装了以下命令:
brew install homebrew/php/php72-xdebug
我将以下命令添加到php.ini文件的底部:
zend_extension=/usr/local/Cellar/php72-xdebug/2.6.0/xdebug.so
注意:如果您需要使用brew搜索xdebug版本,请使用:
brew search xdebug
https://stackoverflow.com/questions/36886982
复制相似问题