phpstorm XDebug调试php设置

本文介绍如何在 Phpstorm 中配置 XDebug 进行 PHP 代码调试,包括 php.ini 中的 XDebug 设置、配置 Phpstorm 的执行环境及调试配置等步骤,并给出注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

phpstorm XDebug调试php设置

前提:
◆已安装php环境并开启xdebug扩展,建议使用phpStudy集成环境,一键开启
◆已安装phpstorm开发工具

在php.ini中xdebug的配置如下:

[XDebug]
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"
xdebug.remote_host = "127.0.0.1"
zend_extension="D:\phpStudy\php53\ext\xdebug.dll"
  1. 配置php执行环境
    这里写图片描述

  2. 配置server
    这里写图片描述

  3. 配置debug Run >> Edit Configurations
    这里写图片描述

  4. 注意事项
    在经过上述的配置后,即可进行调试,但有需要注意的地方:
    debug时,没有在文件起始地方暂停,解决:Run >> break at first line in PHP scripts

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值