如何在 MAC High Sierra 标准安装中使用 xdebug
How to use xdebug with MAC High Sierra standard installation
我用 High Sierra (10.13) 重新安装了我的 macbook。
它包含 Apache/2.4.27 和 PHP 7.1.7。
现在我想激活xdebug。
请问谁能给我一些信息,怎么做?
感谢帮助
解决方法:
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
然后我将 xdebug.so 复制到我的扩展目录中。
Xdebug 与 PHP 7.1 一起预装在 High Sierra (OS X 10.13.5) 上,您只需要启用它,为此,将以下内容粘贴到 \etc\php.ini
[xdebug]
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.idekey="netbeans-xdebug"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.overload_var_dump=0
注意:您可能需要通过 duplicating/renaming 此文件 \etc\php.ini.default
创建一个 php.ini
文件
除上述内容外,您可能 还需要编辑 \etc\apache2\httpd.conf
并进行以下更改:
取消注释这一行
LoadModule php7_module libexec/apache2/libphp7.so
最后粘贴以下内容
<IfModule php7_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
我用 High Sierra (10.13) 重新安装了我的 macbook。 它包含 Apache/2.4.27 和 PHP 7.1.7。
现在我想激活xdebug。 请问谁能给我一些信息,怎么做?
感谢帮助
解决方法:
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
然后我将 xdebug.so 复制到我的扩展目录中。
Xdebug 与 PHP 7.1 一起预装在 High Sierra (OS X 10.13.5) 上,您只需要启用它,为此,将以下内容粘贴到 \etc\php.ini
[xdebug]
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so"
xdebug.idekey="netbeans-xdebug"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.overload_var_dump=0
注意:您可能需要通过 duplicating/renaming 此文件 \etc\php.ini.default
php.ini
文件
除上述内容外,您可能 还需要编辑 \etc\apache2\httpd.conf
并进行以下更改:
取消注释这一行
LoadModule php7_module libexec/apache2/libphp7.so
最后粘贴以下内容
<IfModule php7_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> </IfModule>