#56022 closed defect (bug) (fixed)
Enable coverage mode for xDebug in local Docker environment
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
Recently, the version of xDebug included in the PHP 7.2-7.4 Docker containers was changed from 2.x to 3.x.
One of the changes in xDebug 3.0 was a shift from enabling features to switching xDebug into modes (see the 2.x to 3.0 upgrade documentation). By default, xDebug is in develop mode. However, in order to generate code coverage reports the coverage mode needs to be active.
The code coverage reporting workflow currently runs on PHP 7.4, and was affected by this change. The Code Coverage workflow has not been able to generate a coverage report since then.
Change History (9)
This ticket was mentioned in PR #2832 on WordPress/wordpress-develop by desrosj.
3 years ago
#1
3 years ago
#4
Any reason not to include
debugfor step debugging?
@afragen No reason other than I hadn't considered it. Since the environment is meant for local Core development, I think that's reasonable to include.
I looked into performance implications, and looks like `coverage` slows down Xdebug the most (though less on Xdebug 3.0). I've switched the default to develop,debug and updated the workflow to use the environment variable to change the mode to coverage.
3 years ago
#5
Any reason not to include
debugfor step debugging?
@afragen No reason other than I hadn't considered it. Since the environment is meant for local Core development, I think that's reasonable to include.
I looked into performance implications, and looks like `coverage` slows down Xdebug the most (though less on Xdebug 3.0). I've switched the default to develop,debug and updated the workflow to use the environment variable to change the mode to coverage.
3 years ago
#7
Merged into Core in https://core.trac.wordpress.org/changeset/53552 and https://core.trac.wordpress.org/changeset/53553.
This enables the
coveragemode for xDebug in the local Docker environment in addition to the default mode ofdevelopby passing theXDEBUG_MODEenvironment variable to the container.This environment variable takes precedent, but does not change the value of
xdebug.mode. For more information, see the xDebug documentation about modes.Trac ticket: https://core.trac.wordpress.org/ticket/56022