phpStrom+phpstudy配置xDebug

参考文章:https://blog.csdn.net/qq_32346189/article/details/81144123  (感谢博主分享)

新版phpstrom中,内置 PHP Remote Debug功能,可以避免 startURL的配置(通过PHP Web Page配置debug模式)。

但是地址栏跟参数XDEBUG_SESSION_START=1,不可去掉。

步骤如下:

一、phpstudy配置并启用xdebug扩展

phpstudy默认已经安装了xdebug,但是并没有默认启用。先启用该扩展。然后修改php.ini,内容如下:

[XDebug]
xdebug.profiler_output_dir="E:\software\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="E:\software\phpStudy\PHPTutorial\tmp\xdebug"
zend_extension="E:\software\phpStudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.profiler_output_name = "cache.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"

; //注意这里是,客户端的ip和端口<即IDE的机器的ip和端口,不是你的web server>
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9001
xdebug.remote_mode = "req"
xdebug.idekey = PENCEJZ

最后记得重启phpstudy哦

二、phpstrom配置

1、配置PHP执行程序

注意:此处一定要选择phpstudy当前运行的php版本

2、DEBUG参数配置

3、PHP server参数配置

4、debug运行时环境配置

5、最后访问,的请求地址中跟上 XDEBUG_SESSION_START=1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值