如何选择正确的 xDebug 库?

How do I pick a correct xDebug library?

我有以下 PHP:php -v 输出。

PHP 7.1.12 (cli) (built: Nov 23 2017 04:34:08) ( ZTS MSVC14 (Visual C++ 2015) x86 )

如何为这个包获取正确的 xDebug 库?

它通常说,Failed loading php_xdebug-*.dll 对于大多数文件。

使用 Xdebug 向导页面 -- 它会告诉您:https://xdebug.org/wizard.php

  • 只需粘贴 php -i 输出(从 terminal/console 抓取)或 phpinfo() 通过浏览器抓取的输出(只是文本 -- 没有 HTML)。
  • 在 return 中它会告诉你你的 PHP 版本是什么,你应该下载什么 xdebug 版本以及如何安装它。

注意:它将为您提供最新版本,目前为 2.6.0beta1。我建议坚持使用最新的稳定版本,即 2.5.5——因为它只是稍微改变了 URL。


根据您的 PHP 信息,您很可能需要 downloads page: this would be php_xdebug-2.5.5-7.1-vc14.dll 中标记为 PHP 7.1 VC14 TS (32 bit) 的 link,因为它代表今天。