php - 在 Windows 上安装 XDebug 64 位

标签 php apache xdebug

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

enter image description here

我将以下代码放在 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();

时,我无法看到下面的部分

enter image description here

谁能说出问题出在哪里?

最佳答案

我认为你搞砸了两件事:

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

因为您在 Windows 上,所以还没有稳定的 64 位 PHP 版本,如您所见here :

enter image description here

另外,为了测试这一点,您可以做一些小技巧并运行这段代码:

echo PHP_INT_MAX;

输出:

9223372036854775807  //64bit
2147483647           //32bit

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

关于php - 在 Windows 上安装 XDebug 64 位,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32154717/

相关文章:

php - 使用 href 从数据库中删除数据行

php - mod_rewrite 删除 .php 但仍然提供 .php 文件?

php - Apache 2 mod_rewrite 和 PHP。从 htaccess 修改 $_SERVER ['REQUEST_URI' ] 值?

codeigniter - `enable_query_strings` 工作不正常

php - $_FILES 中的某些键为空

php - 使用 nginx 时任何 php 文件都会出现 404 错误

javascript - 将选中的表行添加到电子邮件正文

apache - 将所有内容重定向到 Apache 上的 www

php - 在 Netbeans 中单步执行(调试)PHP 代码

linux - Docker Xdebug 局域网/公共(public)开发服务器