ITPub博客

首页 > IT职业 > IT职场 > xdebug phpstorm 远程调试PHP

xdebug phpstorm 远程调试PHP

IT职场 作者:d0e1f 时间:2021-09-09 09:07:06 0 删除 编辑

1 linux安装xdebug
pecl install xdebug
zend_extension="/usr/local/php/modules/xdebug.so"
然后php -m 看是否有没安装成功

2 在php.ini中增加
xdebug.idekey=PHPSTORM
xdebug.remote_enable=1
xdebug.remote_host=192.168.10.195 //phpstorm的ip地址
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/data/log/Xdebug"

3 先设置php的cli运行路径
图片描述

设置xdebug的监听端口,并启动xdebug
图片描述

设置server的相关信息
图片描述

配置php web application的信息
图片描述

然后每次debug都要更换下web application 的地址

然后就可以进行xdebug调试了。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4019/viewspace-2799677/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-10-17

  • 博文量
    75
  • 访问量
    552