【问题标题】:Installing XDebug 64bit on windows在 Windows 上安装 XDebug 64 位
【发布时间】:2015-11-16 05:57:45
【问题描述】:

我正在尝试安装 XDebug。我正在使用 64 位的 Windows7。我的 PHP 版本是 5.6.3(使用 phpinfo(); 得到这个)。我将 xdebug 文件放在 php 文件夹内的 ext 文件夹中(我将文件重命名为 php_xdebug.dll)。

我将下面的代码放在 php.ini 文件中并重新启动了 apache。

[XDebug]
zend_extension = "D:\XAMPP\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\XAMPP\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "D:\XAMPP\tmp"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

但是当我尝试使用phpinfo();查看时,我无法看到以下部分

谁能说说问题出在哪里?

【问题讨论】:

  • 没有64位windows PHP版本,尝试使用32位
  • 谢谢@Rizier123。它在 32 位下工作。

标签: php apache xdebug


【解决方案1】:

我认为你搞砸了两件事:

  1. 如果您的计算机有 32/64 位
  2. 如果您的 PHP 版本是 32/64 位版本

因此,由于您使用的是 Windows,因此还没有稳定的 64 位 PHP 版本,如您所见here

为了测试这个,你可以做一个小技巧并运行这段代码:

echo PHP_INT_MAX;

输出:

9223372036854775807  //64bit
2147483647           //32bit

所以下载 32 位 xdebug 版本,一切都应该正常。

【讨论】:

  • 现在我正面临 等待连接 (netbeans-xdebug)。你能在这方面帮助我吗?谢谢
  • @abuabu 我通常不使用netbeans,所以在这里我真的帮不上忙。只需确保 IDE 和 php.ini 文件中的设置匹配即可。 + 每次更改 ini 文件后,您都需要重新启动服务器。
  • 谢谢 - 我有一台 64 位的机器,但我的 PHP 7.3 是 32 位的!
【解决方案2】:

我的解决方案:

zend_extension="W:\php\ext\php_xdebug-2.6.0beta1-7.0-vc14-x86_64.dll"

[XDebug]
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "W:\php"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

【讨论】:

    猜你喜欢
    • 2011-04-08
    • 2017-06-08
    • 1970-01-01
    • 2012-07-02
    • 2011-01-26
    • 1970-01-01
    • 1970-01-01
    • 2015-02-28
    相关资源
    最近更新 更多