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

From: Derick Rethans <derick[@]xdebug.org>
Date: Tue, 19 Apr 2005 09:16:38 +0200 (CEST)

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.

regards,
Derick

-- 
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
Received on Tue Apr 19 2005 - 09:18:47 BST

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