• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

Vagrant+PHPStorm实现XDebug断点调试

武飞扬头像
PHP中文网
帮助34

1.登陆vagrant修改xdebug.ini配置

A.  登陆vagrant:vagrant ssh

B.  修改配置:sudo vim /etc/php/7.0/fpm/conf.d/20-xdebug.ini
      配置内容:
     zend_extension=xdebug.so
     xdebug.remote_enable = 1
     xdebug.remote_connect_back = 1
     xdebug.remote_port = 9001
     xdebug.max_nesting_level = 512
     xdebug.remote_host="192.168.10.10"
     xdebug.idekey = "PHPSTORM"
     xdebug.default_enable = 1
     xdebug.remote_enable = 1
     xdebug.remote_autostart = 1
     xdebug.remote_handler="dbgp"

  C.重启php: sudo service php7.0-fpm restart

2.在PHPStorm->Preferences->Languages & Frameworks->PHP中箭头指向配置
学新通技术网

选择 ,选择from vagrant
学新通技术网

配置如下:

学新通技术网

在PHP->Debug->DBGp Proxy设置如下

学新通技术网

在PHP->Debug设置端口

学新通技术网

在PHP->Servers中设置映射路径

学新通技术网

3.在google中下载Xdebug helper,并配置

学新通技术网

备注:如果不能断点代表Xdebug和php版本不对应,可以将其他php版本的20-xdebug.ini都设置

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanffbch
系列文章
更多 icon
同类精品
更多 icon
继续加载