1.vagrant (linux)环境下 xdebug 配置 :

zend_extension=xdebug.so
xdebug.remote_enable = 1 
xdebug.remote_connect_back = 1 
xdebug.remote_port = 9100
xdebug.idekey = "phpstorm" 
xdebug.remote_autostart = 1 
xdebug.remote_handler="dbgp"
xdebug.remote_mode="req"

2.phptorm 配置:

设置好端口,和xdebug 设置的一样:

设置好 目录映射,这很关键

配置完成,测试debug

run->start listening for php debug connections->打断点->debug

浏览器访问网站, phpstorm 那边访问搞定!!

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持www.887551.com。