How do I get xdebug/step-debugging working with ddev?

后端 未结 2 1825
日久生厌
日久生厌 2021-01-03 13:36

I\'ve been working with ddev on my Drupal projects, and now want to use xdebug so I have step-debugging with PhpStorm (or really any IDE would be fine). But I can\'t seem to

2条回答
  •  [愿得一人]
    2021-01-03 13:45

    Thanks, had the same problem and adding the file .ddev/docker-compose.xdebug.yaml fixed the issue.

    However, I am running on a Mac / OSX and found these additional steps worked to discover the IP address of the internal host from inside the container:

    1.) Log into the web continaner ddev ssh

    2.) Run ping docker.for.mac.localhost

    3.) Set the returned IP address for host.docker.internal in the above yaml file.

    4.) Remove and start the DDEV.

    Also worth mentioning validating xdebug in PHPStorm is useful to check the config.

提交回复
热议问题