-
Notifications
You must be signed in to change notification settings - Fork 198
MCLOUD-6430: Xdebug not working on Magento Cloud Docker 1.1 #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * Include Xdebug if --with-xdebug is set | ||
| */ | ||
| if ($config->hasServiceEnabled(ServiceInterface::SERVICE_FPM_XDEBUG)) { | ||
| $envVariables = ['PHP_EXTENSIONS' => implode(' ', array_unique(array_merge($phpExtensions, ['xdebug'])))]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you merge with xdebug here? Should not it be in the config already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this configuration only for fpm_xdebug container and it needs to have enabled xdebug extension.
$phpExtensions may not have xdebug if it not set-up in .magento.app.yaml
| [ ! -z "${MAGENTO_RUN_MODE}" ] && sed -i "s/!MAGENTO_RUN_MODE!/${MAGENTO_RUN_MODE}/" /usr/local/etc/php-fpm.conf | ||
|
|
||
| # Set host.docker.inernal for LINUX os | ||
| if [[ "$SET_DOCKER_HOST" = "true" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have it enabled by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need it by default? This option has a sense only for Linux system.
Also I tested it on macOS with generated host.docker.inernal and xdebug didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ic, thanks
|
Tested in MacOS and it's working fine. @BaDos is testing in his virual box |
|
Tested on my linux machine, it works. |
Description
Fixed issue with not working xdebug.
Fixed Issues (if relevant)
Manual testing scenarios
magento-cloud2.3.5 templatehttps://devdocs.magento.com/cloud/docker/docker-development-debug.html
build:composecommand with additional option--set-docker-hosthttps://devdocs.magento.com/cloud/docker/docker-development-debug.html
Release notes
Added the
--set-docker-hostoption to theece-docker build:composecommand to configure the host.docker.internal name in the fpm:xdebug container. On Linux systems, this option is required to use Xdebug in the Docker development environment.Associated documentation updates
Add link to Magento DevDocs PR or Issue, if needed.
Contribution checklist