【问题标题】:Failed loading ext\php_xdebug-2.6.1-7.1-vc14-nts.dll and Error:No code coverage driver is available加载 ext\php_xdebug-2.6.1-7.1-vc14-nts.dll 失败和错误:没有代码覆盖驱动程序可用
【发布时间】:2019-07-22 02:35:15
【问题描述】:

所以我一直在对我的 laravel 项目进行一些单元测试。我需要知道我的测试的代码覆盖率,所以我需要在我的计算机上安装 xdebug。但是按照安装指南进行操作后,我总是会收到此错误

PS D:\Telkom\tpncms> vendor\bin\phpunit tests\Feature\WebmasterBannersTest.php

加载 ext\php_xdebug-2.6.1-7.1-vc14-nts.dll 失败

Sebastian Bergmann 和贡献者的 PHPUnit 6.5.14。

错误:没有代码覆盖驱动程序可用

....... 10 / 10 (100%)

时间:3.79 秒,内存:26.00MB

这是我的 php.ini 的 sn-p

[XDebug]
zend_extension = php_xdebug-2.6.1-7.1-vc14-nts.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\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.remote_log="c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
; 3600 (1 hour), 36000 = 10h
xdebug.remote_cookie_expire_time = 36000

我还通过我的 php 信息从https://xdebug.org/wizard.php 推荐下载 Xdebug 版本,所以我得到了适合我设备的正确安装。我一直在从这个站点寻找正确的解决方案,比如更改 php.ini,或更改 Xdebug 版本,但没有任何效果

在 php 信息中出现 xdebug。它哪里出错了? 我使用 laravel 5.5 和 Visual Studio 代码作为我的文本编辑器

我在 C:\PHP7.1\ext\php_xdebug-2.6.1-7.1-vc14-nts.dll 上安装了我的 xdebug。

是不是因为我已经在 XAMPP 附带的 php 之外安装了 php? 如果是,我该如何解决?

【问题讨论】:

    标签: php laravel unit-testing xdebug


    【解决方案1】:

    问题已解决,问题是我的服务器正在使用位于 xampp 中的 php ini,而我的 xdebugs 安装在 xampp 外部的 php 文件夹中。所以我将php的本地环境更改为xampp文件夹

    【讨论】:

      猜你喜欢
      • 2016-06-19
      • 2021-01-30
      • 2020-03-18
      • 2016-09-13
      • 2018-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-06
      相关资源
      最近更新 更多