Vagrant+PHPStorm+Google+XDebug断点调试

1.登录vagrant修改xdebug.ini配置php

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中箭头指向配置

clipboard.pngvim

选择+,选择from vagrant

clipboard.pngphp7

配置以下:ssh

clipboard.png

在PHP->Debug->DBGp Proxy设置以下ide

clipboard.png

在PHP->Debug设置端口google

clipboard.png

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

clipboard.png

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

clipboard.png

备注:若是不能断点表明Xdebug和php版本不对应,能够将其余php版本的20-xdebug.ini都设置debug

相关文章
相关标签/搜索