Ubuntu 在 PHPStorm 使用 xdebug
Apache
装好
PHP
还有xdebug
在phpinfo()
中
找到
php.ini
的位置 (/etc/php/7.1/cli/php.ini
注意版本)
加上下面这几句 其中端口号,如果是9000没有冲突也不需要改zend_extension = /usr/lib/php/20151012/xdebug.so xdebug.remote_host = 127.0.0.1 xdebug.remote_enable = 1 xdebug.idekey=”PHPSTORM” xdebug.remote_enable=on xdebug.remote_port = 9003 xdebug.remote_handler = dbgp xdebug.remote_mode = req
重启
systemctl restart httpd2
phpinfo()
显示PHPSTORM 设置
Nginx
- 因为
Nginx
是通过php-fpm
来加载php
文件的 ,
所以第二步的配置文件在/etc/php/7.1/fpm/php.ini
(端口不能为9000,因为和 Nginx 冲突)