You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
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
Description
I'm getting the error "To fix it set server name by environment variable PHP_IDE_CONFIG and restart debug session." in the debug window of phpstorm. Docker-Compose setup or the guide seems to be missing something to successfully accept incoming remote debugging connections.
Steps To Reproduce
Follow all "Xdebug & PHPStorm" steps on phpstorm 2020.1.
Remote debugging fails.
Expected Result
Xdebug should stop at the breakpoint of
src/pub/index.php
. e.g. at
$bootstrap->run($app);
.
Actual Result
Window pops up when loading the homepage of magento2.test. None of the fields are editable. Trying different options here does not seem to work.
Then, this error
I added a env variable,
PHP_IDE_CONFIG=serverName=magento2.test
to
phpfpm
, and that seems to have resolved the issue. I had tried to add it to the nginx container (doh), and obviously, that wasn't right.
Off topic, but I also set
max_allowed_packet=64M
to allow the Magento data migration tool to run. The default setting wasn't sufficient.
Hi
@younkim
. I apologize for not replying, I have been on vacation for a while. The
PHP_IDE_CONFIG
var should not need to be set for Xdebug to work. I have tested this many times and it all works out of the box as long as the other config is setup in PHPStorm.
As far as
max_allowed_packets
, I have reopened this ticket about this. I have noticed this a long time ago. I will make an update so that this config is set out of the box so we don't need to make this change. All of the built-in Magento code should be able to be worked with out of the box instead of needing to make one-off config changes 😄
changed the title
To fix it set server name by environment variable PHP_IDE_CONFIG and restart debug session
Increase max_allowed_packet to 64M for proper running of data migration tool
Aug 16, 2020
Before:
MySQL [magento]> SHOW VARIABLES like '%max_allowed_packet%';
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| max_allowed_packet | 4194304 |
After:
MySQL [magento]> SHOW VARIABLES like '%max_allowed_packet%';
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| max_allowed_packet | 134217728 |
@younkim
I added a env variable, PHP_IDE_CONFIG=serverName=magento2.test
to phpfpm
, and that seems to have resolved the issue. I had tried to add it to the nginx container (doh), and obviously, that wasn't right.
have the same problem. Unfortunately, it does not still work for me too, even with PHP_IDE_CONFIG. How did you do that? just export PHP_IDE_CONFIG=serverName=magento2.test?
UPDATE:
i solved that by adding environment for PHP_IDE_CONFIG into docker config:
image: markoshust/magento-php:7.4-fpm-0
links:
volumes: *appvolumes
environment:
- PHP_IDE_CONFIG=serverName=magento2.test