加载ext \ php_xdebug-2.6.1-7.1-vc14-nts.dll失败,并且错误:没有代码覆盖驱动程序

时间:2019-02-28 08:26:33

标签: php laravel unit-testing xdebug

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

  

PS D:\ Telkom \ tpncms>供应商\ 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的代码段

[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吗? 如果可以,我该如何解决?

1 个答案:

答案 0 :(得分:0)

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