Xdebug phpstorm断裂点不突破

发布于 2025-01-25 13:03:48 字数 1110 浏览 3 评论 0原文

我有一个docker容器,然后添加xdebug。在我的dockerfile中,我添加了

&& pecl install xdebug-3.1.3 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >>  /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 

docker-compose:

    extra_hosts:
      - "host.docker.internal:host-gateway"

正确检测到了phpstorm和xdebug中的CLI解释器。

现在,如果添加一个断点,我的脚本就不会停止。但是,如果我添加xdebug_break()我的脚本将停止。

如何使其与PHPSTORM断点一起使用?

此外,我被迫在Chrome中安装Xdebug。在我看来,我以前不需要此扩展名,只是为了听PHPSTORM中的PHP调试连接。

有xdebug配置

”

I have a Docker container and I add Xdebug to it. In my DockerFile I add

&& pecl install xdebug-3.1.3 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >>  /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini 

in docker-compose:

    extra_hosts:
      - "host.docker.internal:host-gateway"

I've configured the CLI Interpreter in PhpStorm and Xdebug is correctly detected.

Now, if I add a breakpoint, my script doesn't stop. But if I add xdebug_break() my script will stop.

How to make it work with PhpStorm breakpoint ?

Moreover I was forced to install Xdebug in Chrome. It seems to me that I did not need this extension before, just to listen or not for PHP Debug Connections in PhpStorm.

there is xDebug config
xdebug config 1

xdebug config 2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文