只配置Debug,不配置profiler和trace,profiler和trace干嘛的请百度。
因为大多数情况下是单用户调试,所以不需要配置多用户参数,
如:php.ini 文件 xdebug.idekey 参数和 PhpStorm的Debug -> DBGp Proxy
php.ini配置:
[xdebug]
zend_extension = "D:\xampp\php\ext\php_xdebug-2.9.6-7.3-vc15-x86_64.dll" debug路径
xdebug.remote_enable = On 开启
xdebug.remote_port=9000 php端口
xdebug.remote_host="192.168.1.13" 要监听的域名
xdebug.remote_autostart = On 是否需要携带SESSion On 不需要 off 需要
访问地址:https://xdebug.org/wizard.php ,粘贴 phpinfo 信息到输入框,点击按钮进行分析当前 phpinfo 适配的 xdebug 版本,然后进行下载
检测 phpinfo,并下载对应 xdebug 版本
debug安装完成,配置phpstorm:
打开PhpStorm,菜单 File -> Settings ,然后找到 Languages & Frameworks -> PHP -> Debug
设置Debug port为9000
image.png
配置SERVER
菜单 File -> Settings ,然后找到 Languages & Frameworks -> PHP -> Server
image.png
添加,完成后,下断掉,启动小电话,完成
image.png
网友评论