[xdebug-general] Re: Incorrect code coverage reading from Xdebug 2.0.0 Beta 2

From: Nimish Pachapurkar <npac[@]spikesource.com>
Date: Wed, 20 Apr 2005 13:20:00 -0700

Derick Rethans wrote:

>On Mon, 18 Apr 2005, Nimish Pachapurkar wrote:
>
>
>
>>I am using Xdebug 2.0.0 Beta 2 with PHP 5.0.3. I have configured the
>>Xdebug extension on Fedora Core 3.
>>
>>When I try to run the example given on Xdebug site for code coverage
>>measurement (http://xdebug.org/docs-functions.php#coverage), I get
>>incorrect readings. Specifically, the frequency of execution is
>>always returned as "1" - even for statements in the loop. It seems
>>that the coverage recordings are consistent with respect to which
>>lines were covered (executed at least once) and which were not.
>>
>>Here is the output that I got by running the sample code from Xdebug
>>documentation (as is). Line 10 is inside a for loop and is definitely
>>executed more than once. There are other lines also that are executed
>>more than once. However, as you can see below, the frequency for all
>>the lines is 1.
>>
>>
>
><snip>
>
>
>
>>Can someone please let me know if this is a known issue with this
>>version or I have not configured the extension properly.
>>
>>
>
>This is actually a documentation problem. Early versions did return the
>number of times a specific line was executed, but it is very hard to do
>right - thus now Xdebug only runs -1, 0 or 1. I'll update the
>documentation.
>
>
>
Does this mean that there is no plan to actually get the frequency
working like it used to in the earlier version? Does -1 mean that the
line is executable PHP code line but is not being exercised at all?

Also, can you explain a little as to why is it very hard to get the
frequency of execution right?

Thanks,
Nimish
Received on Wed Apr 20 2005 - 22:22:18 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST