Mac系统下安装PHP Xdebug

yipeiwu_com5年前PHP代码库

Mac下安装PHP调试工具Xdebug

安装步骤

  1. brew install php70
  2. brew install php70-xdebug
  3. php -i | grep xdebug.ini找到xdebug.ini的配置文件我的是/usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
  4. vim /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
配置如下:
[xdebug]
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9001  #这个端口不要被占用即可,可以自行指定
xdebug.idekey = PHPSTORM
xdebug.remote_autostart=1
xdebug.remote_log=/var/tmp/xdebug.log

在PHPStorm中配置

我的调试地址:http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550

愉快的调试吧,哈哈

相关文章

fleaphp常用方法分页之Pager使用方法

Pager 分页函数 复制代码 代码如下: /** * 构造函数 * * 如果 $source 参数是一个 TableDataGateway 对象,则 FLEA_Helper_Pager...

JS中encodeURIComponent函数用php解码的代码

JS中encodeURIComponent函数给中文编码后,如何用php解码?? 前提:编码前的中文可能是gbk,gb2312,utf-8等。 复制代码 代码如下: urldecode(...

PHP中strcmp()和strcasecmp()函数字符串比较用法分析

本文实例讲述了PHP中strcmp()和strcasecmp()函数字符串比较用法。分享给大家供大家参考,具体如下: 一、PHP中strcmp()函数用于比较两个字符串(区分大小写),其...

ajax取消挂起请求的处理方法

我们在切换选项卡的时候,如果使用的是ajax技术,会碰到如下情况:点击tab1选项,服务器发出一个Ajax请求获取该选项tab1的内容数据。如果请求正在处理,并且在此过程中你点击了tab...

php的GD库imagettftext函数解决中文乱码问题

本文实例讲述了php的GD库imagettftext函数解决中文乱码问题的方法。分享给大家供大家参考。具体如下: 使用imagettftext写中文时,常出现乱码问题。解决方法是将中文字...