XDEBUG 远程启用未启用

XDEBUG remote enable not enabaling

这是我的 php.ini xdebug 文件

[Xdebug]
zend_extension=C:\wamp64\bin\php\php7.0.0\ext\php_xdebug-2.4.0-7.0-vc14-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir=C:\wamp64\tmp

但根据 php 信息,远程启用已禁用。 如果我在解释器下进入 phpstorm,它会将 xdebug 识别为调试器。如果您需要更多信息,请告诉我。

编辑: 我试过@lllypa sloution 无济于事。我正在使用 windwos 10、firefox 和 wamp 3.0.0 64 位 php 7

我重装了服务器发现这个问题还是不行。我可以访问本地主机,php 脚本可以工作,但我无法调试。

[xdebug]
zend_extension = C:\wamp64\bin\php\php7.0.0\ext\php_xdebug-2.4.0-7.0-vc14-x86_64.dll
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp64/tmp"
xdebug.show_local_vars=0

正如我从问题和标签中了解到的那样,您正在使用 Windows 和 WAMP,对吧? WAMP 有多个 php.ini 个文件:

  1. %Apache 文件夹%\bin\php.ini
  2. %PHP文件夹%\php.ini
  3. %PHP文件夹%\phpForApache.ini

据我所知,phpForApache.ini 是具有 "final" 值的那个,所以看看它是否有 xdebug 设置。或者为了确保您正在编辑正确的 *.ini 文件,请使用 WAMP 应用程序(在任务栏上单击 WAMP 图标 -> PHP -> php.ini)。

让我们知道这是否有帮助,或者向我们提供有关您的系统和您正在执行的步骤的更多详细信息。

PS。尝试将这些参数添加到您的设置中:

xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp

并确保您 运行 您的项目在同一台主机上。如果 phpstorm 有一些 xdebug 配置 - 确保端口相同。