You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在XAMPP的PHP 7.0.6环境中安装XDebug求助

我看你已经在XAMPP里折腾XDebug安装啦,目前做的这几步都踩对了点,我帮你把已完成的操作梳理清楚,再补全你没写完的配置和后续验证的关键步骤:

XDebug在XAMPP中的安装进度与补全指南

已完成的核心操作

  • 将对应版本的XDebug扩展文件 php_xdebug-2.6.0-7.0-vc14-nts-x86_64.dll 放置到XAMPP的PHP扩展目录:C:\xampp\php\ext
  • 在php.ini中禁用输出缓冲,设置:output_buffering=Off
  • 在php.ini中添加了XDebug的基础配置段(我帮你补全常用的完整配置)

补全XDebug的php.ini配置

把下面的完整配置块替换/补充到你的php.ini里,覆盖你没写完的部分:

[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.6.0-7.0-vc14-nts-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1  ; 开启远程调试功能
xdebug.remote_host = "localhost"  ; 调试主机,本地调试填localhost即可
xdebug.remote_port = 9000  ; XDebug默认调试端口,和你的IDE保持一致
xdebug.remote_autostart = 0  ; 按需开启,设为1会自动触发调试,不用手动启动
xdebug.remote_handler = "dbgp"  ; 标准调试协议
xdebug.idekey = "PHPSTORM"  ; 对应你用的调试工具密钥,比如PhpStorm就用这个,其他IDE按需修改

验证安装是否成功的步骤

  1. 重启XAMPP的Apache服务,确保配置生效
  2. 在XAMPP的网站根目录(一般是C:\xampp\htdocs)创建一个info.php文件,内容如下:
<?php
phpinfo();
?>
  1. 打开浏览器访问http://localhost/info.php,在页面里搜索关键词XDebug——如果能看到XDebug的版本、配置信息块,就说明安装配置成功了

内容的提问来源于stack exchange,提问作者Afsrd3

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:42:53