XAMPP无法安装xdebug

Nie*_*man 8 php xampp netbeans xdebug

您好我已经安装了xampp,将php.ini更改为:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.3-5.3-vc9.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
Run Code Online (Sandbox Code Playgroud)

所以我创建了一个php文件:

<?php
phpinfo();
?>
Run Code Online (Sandbox Code Playgroud)

复制粘贴内容并粘贴到xdebug向导中并获得此输出:

Tailored Installation Instructions

Summary

Xdebug installed: no
Server API: Apache 2.4 Handler Apache Lounge
Windows: yes - Compiler: MS VC9 - Architecture: x86
Zend Server: no
PHP Version: 5.4.7
Zend API nr: 220100525
PHP API nr: 20100525
Debug Build: no
Thread Safe Build: yes
Configuration File Path: C:\Windows
Configuration File: C:\xampp\php\php.ini
Extensions directory: C:\xampp\php\ext
Instructions

Download
Move the downloaded file to C:\xampp\php\ext
Edit C:\xampp\php\php.ini and add the line
zend_extension = C:\xampp\php\ext\
Restart the webserver
If you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.
Run Code Online (Sandbox Code Playgroud)

这告诉我它没有安装,所以我按照说明重新启动了服务器.再次打开信息php,再次复制所有内容并再次将其粘贴到向导中.按下按钮,我得到完全相同的输出,我不知道我做错了谁能告诉我我做错了什么?

Jun*_*ari 12

第1步: 转到https://xdebug.org/wizard.php

第2步:将您的phpinfo输出复制并粘贴到textarea,它将显示在https://xdebug.org/wizard.php上

第3步:点击分析我的phpinfo()输出按钮,它将分析你的系统,并根据它将为你提供你需要放在D:\ xampp\php\ext文件夹的合适的php_xdebug.dll文件

第4步:编辑你的php.ini文件并添加以下行 zend_extension = D:\ xampp\php\ext\your-php_xdebug.dll

第5步:重新启动服务器

参考视频教程:https://www.youtube.com/watch?v = HbJOP0YcSjs

完整视频教程PHP调试示例:演示


Key*_*ang 9

最近的 XAMPP版本(我的是V3.2.2)已经有文件php_xdebug.dllxampp\php\ext文件夹,所以我们并不需要https://xdebug.org/wizard.php下载该文件.

只需打开文件xampp\php\php.ini,添加代码:

[xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
Run Code Online (Sandbox Code Playgroud)

重新启动XAMPP,然后您可以看到xdebug php --version在CMD中按类型工作:

Xdebug的


小智 1

您解决了这个问题吗?如果没有,请尝试这个。我的情况和你一样,我得到的结果是

1)php.ini文件内容

zend_extension = "c:\xampp\php\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
;xdebug.remote_host="localhost:81"
xdebug.remote_host=192.168.1.5
;xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
Run Code Online (Sandbox Code Playgroud)

请将上述dll放置在c:\xampp\php\ext\

xdebug.remote_host=192.168.1.5 - 这是我系统的 IPv4 地址,我更改为此地址,因为我无法使用 localhost 和 127.0.0.1 进行调试。

在 NetBeans IDE 中,打开“工具”->“选项”->“PHP”->“调试”。调试器端口和会话 ID 的值应与 php.ini 中指定的端口和 idekey 匹配

现在保存 php.ini,重新启动 Apache,然后尝试调试

谢谢约翰逊