Undefined function xdebug_code_coverage_started ()

I am trying to get Xdebug code coverage analysis for PHP running on the command line, but I am getting a undefined functional error for code coverage functions. I do not use PHPUnit and I do not use IDE. My text editor is Komodo Edit.

I use:

  • Windows 8
  • PHP 5.4.12
  • Apache 2.2.4 (but with PHP command line)
  • Wamp

I downloaded Xdebug 2.2.4 for PHP 5.4 VC9 TS (64 bit) and followed the instructions on the Xdebug install page to configure my computer.

I changed the php.ini files in C: \ wamp \ bin \ apache \ Apache2.4.4 \ bin and C: \ wamp \ bin \ php \ php5.4.12 to have the following settings for xdebug:

zend_extension = c:\wamp\bin\php\php5.4.12\ext\php_xdebug-2.2.4-5.4-vc9-x86_64.dll

[xdebug]
xdebug.remote_autostart=on
xdebug.remote_enable = on
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp/xdebug"
xdebug.idekey=xdebug
xdebug.remote_log="c:/wamp/tmp/xdebug/xdebug_remote.log"
xdebug.coverage_enable = on

I added XDEBUG_CONFIG = "idekey = xdebug" to my environment variables. Then I restarted WAMP.

xdebug_code_coverage_started() script,

PHP : undefined xdebug_code_coverage_started()

, . var_dump(xdebug_get_headers()) . phpinfo , xdebug.coverage_enable .

:

  • xdebug.coverage_enable ( )
  • XDEBUG_CONFIG
  • xdebug.remote_enable
  • xdebug.idekey, xdebug.remote_log xdebug.remote_autostart

.

PHP Xdebug?

+4
1

XDebug php 5.3 :

[Xdebug] zend_extension="<path to php_xdebug.dll>" 
xdebug.remote_enable=1 
xdebug.remote_port="<the port for Xdebug to listen to>" 
(the default port is 9000) 
xdebug.profiler_enable=1 
xdebug.profiler_output_dir="<AMP home\tmp>"

WAMP.

0

Source: https://habr.com/ru/post/1537956/


All Articles