[8.x] Adds XDEBUG_MODE and XDEBUG_CONFIG to the list of env vars that are passed on to the php web server #38228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alternative implementation for #38211
This is needed for when using a .env file but still need to provide environment variables to PHP or a PHP extension such as xdebug.
Currently, Laravel Sail won't work with xdebug if you provide the configuration thru the XDEBUG_MODE and XDEBUG_CONFIG environment variables because this command doesn't pass the variables onto the php web server. You are forced to provide the xdebug configuration in the php.ini file but that isn't convenient for being able to turn xdebug on/off and switch between modes.