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設定如下