PHPStorm & XDebug in docker pauses execution far far too often
-
Disclaimer: this is a cross-post to https://stackoverflow.com/questions/77709219/phpstorm-xdebug-pauses-execution-far-far-too-often.
I’m using PHPStorm 2022.3 and set up a WordPress & mariadb each in a docker container, with XDebug v3.3.0 and PHP 8.2.13 installed. I set up PHPStorm properly, actually everything is working. However, it’s working too well. Even when the WordPress container is starting up, execution pauses, the debugger is triggered on
wc-cli.phar
(it’s abitname/wordpress
image, it does a lot when starting up) and I have to manually continue the program multiple times before it’s loaded. Whenever I interact with the homepage it triggers on every*.php
file, includingadmin-ajax.php
. Obviously none of those have breakpoints set. My own breakpoint do work, it’s just a terrible UX that “random” code points trigger debug breaks.My
xdebug.ini
:zend_extension="/opt/bitnami/php/lib/php/extensions/xdebug.so" xdebug.mode=debug xdebug.start_with_request=yes xdebug.log=/dev/stdout xdebug.log_level=0 xdebug.client_port=9003 xdebug.client_host="host.docker.internal"
I tried with
xdebug.start_with_request=no
, but then breakpoints wouldn’t trigger at all, also not mine.Also, in PHPStorm I didn’t need to configure much, I added the path mappings to the WordPress root inside the container. But even only giving a mapping for a deeper subfolder results in the same behavior.
Maybe it’s a XDebug option I’m missing?
- The topic ‘PHPStorm & XDebug in docker pauses execution far far too often’ is closed to new replies.