[xdebug-general] Re: xdebug_get_code_coverage - shows all 1's

From: Derick Rethans <derick[@]xdebug.org>
Date: Thu, 18 Jan 2007 09:26:17 +0100 (CET)

On Wed, 17 Jan 2007, Sam Keen wrote:

> I may have misunderstood,
> I thought it showed
> {line#} => {# of times executed} like in the examples result posted in
> the docs (xdebug.org/docs-functions.php#xdebug_get_code_coverage)...

Unfortunately the docs are a bit outdated there. It's impossible to
really see how often a line has been executed as each line might have
multiple execution statements on them.

However, you can use code coverage to detect which code can be executed,
and which code can't be executed. Use the XDEBUG_CC_UNUSED |
XDEBUG_CC_DEAD_CODE flags to xdebug_start_code_coverage() to enabled


PS: Please keep cc-ing the mailinglist when you reply.
Received on Thu Jan 18 2007 - 09:27:30 GMT

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