windos参考:http://laichuanfeng.com/work/configuring-xdebug-with-phpstrom/php
由于环境不一样,走了不少弯路,基于赖同窗的博客整理web
xdebug.ini已经生成(根据具体状况,没有就写在php.ini),默认在 /etc/php/7.0/mods-available/下,编辑成如下内容浏览器
[XDebug] zend_extension = xdebug.so xdebug.profiler_enable = 1 xdebug.profiler_output_dir = "/tmp" xdebug.remote_enable = 1 xdebug.remote_port=9000 xdebug.remote_host = "mds-parts-tst.dev.***"
//其中代指本地为网站配置的虚拟域名,为调试监听商品,一般使用默认的 9000 端口xdebug.remote_hostxdebug.remote_port
若是能正确显示出PHP和xdebug版本,那么就安装成功了,若是没有请继续往下看服务器
楼主在这里折腾了好久php7
//点开Configuration file (...) ,全部的配置加载的是/etc/php7.0/cli ...,恍然大悟 //由于我同时装了cli和fpm,平时一直配置的都是fpm,那么咱们把xdebug.ini引到这个目录下就行了
sudo ln -s /etc/php/7.0/mods-available/xdebug.ini 20-xdebug.ini
再试试吧网站
host是第二步xdebug.ini中配置的 xdebug.remote_hostspa
debug port 是 xdebug.ini 中的 xdebug.remote_port插件
Run>Web Server Debug Validation,完成配置的填写,点击“Validate”按钮便可验证服务器的调试配置是否正确:debug
validate script 填写你的web目录,它会生成一个临时文件要能访问到,随后删除3d
好了,开始使用吧,除了经过下面这种方式还能够下载chrom浏览器插件,请参考博文开头懒同窗的博客
更多具体用法请参阅视频:
https://youtu.be/jkv0dzW3IM4