I want to use pcov instead of xdebug for code coverage generation.
I'm using Docker and I have xdebug installed.
Can I be sure that xdebug won't affect test execution if I run the following command?
php -d xdebug.default_enable=0 -d pcov.enabled=1 path/to/phpunit --coverage-text
I read that pcov might be faster but as I understood xdebug has to be disabled.
Is it better do the following to achieve the fastest coverage instead of running the above command?
- remove/truncate xdebug config
run tests
php -d pcov.enabled=1 path/to/phpunit --coverage-textrestore xdebug config
xdebug will cost performance even if disabled with:
The impact is not negligible.
You're better off disabling the
xdebugextension completely before running your tests.This will give you the best performance if you're using
pcovto generate the code-coverage.