Vagrant+PHPStorm+Google+XDebug断点调试
文章目录
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都设置
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论