Skip to content

Docker image bscheshir/php:7.2.5-fpm-alpine-4yii2-xdebug cannot connect to the host machine for XDebug #1

@James-ZHANG

Description

@James-ZHANG

Hi, I've tried to set up a yii2-advanced template through your docker-compose settings. It works nicely on a first try and I could access the template application through the web browser.

However, I've had difficulty configuring the XDebug support for PhpStorm. It seems the problem is: within the container bscheshir/php:7.2.5-fpm-alpine-4yii2-xdebug you cannot connect to the host machine through a dns entry like 127.0.0.1 my-fancy-servername in /etc/hosts.

To trigger the problem:

  1. Do every step in the install.md, with the php-code directory filled with a yii2-advanced template project.
  2. Configure a php server in PhpStorm, setting port to 8080, choosing XDebug as the debugger.
  3. Debug the application in PhpStorm using a PHP Web Page debug setting.

The symptom: The application can be started in the browser, but the breakpoint cannot be hit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions