Skip to content

XDEBUG coverage report does not run outside docker container #791

@BigBlockStudios

Description

@BigBlockStudios

Sail Version

1.37

Laravel Version

11.44

PHP Version

8.3

Operating System

Linux

OS Version

22.04

Description

when running ./sail php artisan test --coverage from my host machine I get an error:

 WARN  Unable to get coverage using Xdebug. Did you set Xdebug's coverage mode?

if I run php artisan test --coverage inside the docker container, the coverage tests complete without error.

I have checked and double checked the docs even adding a route to check that xdebug is configured

Route::get('/xdebug', function () { xdebug_info(); });

Docker version is 27.5.1

.env

SAIL_XDEBUG_MODE=develop,debug,coverage

/docker/php8.3/php.ini

[xdebug]
xdebug.mode=${XDEBUG_MODE}

Everything appears to be correct.... what could the issue be??

Steps To Reproduce

I've updated the configs and rebuilt sail several times, no changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions