phpstorm - PhpStorm 无法识别 xdebug.remote_enable
问题描述
我正在使用 xdebug 尝试 PhpStorm,但是当我尝试验证配置时,向我显示警告:未启用远程调试,如下图所示。以同样的方式 phpinfo() 将 xdebug.remote_enable 显示为 Off,当然,调试也不起作用。
php.ini xdebug 配置:
[xdebug]
zend_extension = /usr/lib/php/20180731/xdebug.so
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/tmp/xdebug/"
xdebug.remote_host = "localhost"
xdebug.remote_port=9000
xdebug.idekey="PHPSTORM"
解决方案
您必须编辑错误的 php.ini 文件.. 或者在单独的 .ini 文件中定义了 Xdebug 设置(除了主文件之外还要对其进行解析)。
在 Linux 和 Mac 上,CLI 和 Web 服务器有不同的 php.ini 是很常见的。
检查phpinfo()
输出,上表:它将显示该 PHP 安装使用的所有配置文件。
推荐阅读
- sql - 左加入建议
- erlang - Elixir - 如何改进代码和风格
- ios - App Visibility 将 Apple 开发者帐户从个人迁移到企业
- python - 列表拼接变量赋值自动化
- java - 构建超过10万个key的map时如何避免内存不足
- c# - SwiPICs.dll PlEngine.Initialize FileNotFoundException
- c# - 删除文本不包含值的 csv 行
- traefik - Kubernetes 上的 Traefik Ingress Controller,接收权限错误
- r - 如何格式化包含日期的列
- regex - 使用正则表达式忽略多个小数并仅检索字符串中的数字