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

愉快的调试吧,哈哈

相关文章

php文件上传表单摘自drupal的代码

drupal文件上传表单的例子 复制代码 代码如下: function upload_form() { $form = array(); // If this #attribute is...

PHP Ajax实现页面无刷新发表评论

大家都有在网站发表评论的经历,传统的发表过程无非是:发表->提交页面表单->等待刷新页面,这样在网络比较拥挤的时候,往往需要漫长的等待,今天介绍用PHP+Ajax实现页面无刷...

discuz程序的PHP加密函数原理分析

原理如下,假如:   加密   明文:1010 1001   密匙:1110 0011   密文:0100 1010   得出密文0100 1010,解密之需和密匙异或下就可以了   解...

PHP中filter函数校验数据的方法详解

介绍PHP中filter函数校验数据的方法详解,PHP过滤器包含两种类型:Validation用来验证验证项是否合法 、Sanitization用来格式化被验证的项目,因此它可能会修改验...

php实现的表单验证类完整示例

本文实例讲述了php实现的表单验证类。分享给大家供大家参考,具体如下: <?php /** * 用法 * use Validate\Validator; *...