Open MadridianFox opened 1 year ago
@MadridianFox same here - after changing a breakpoint, I need to restart the container.
I started working with xdebug_break()
for now.
I don't think this is related to Swoole; it seems to be the issue of Xdebug itself. When you run a plain PHP script and try to add a breakpoint while it's running, it doesn't work either.
I've reported it on XDebug side to see if I'm correct: https://bugs.xdebug.org/view.php?id=2161
AFAIK you need to set breakpoints before running the script or during a break on another breakpoint. This works well for my setup which seems to be the same as yours
When you add a breakpoint in an IDE, it sends a breakpoint request to xdebug. The added breakpoint is only effective if xdebug can process the breakpoint request. The reason why you can continue adding breakpoints while the program is stopped at a breakpoint is that xdebug blocks the program's continued execution, takes control of your application, and can receive instructions from the IDE, such as adding another breakpoint. However, when the program has completed its execution, it is no longer under the control of xdebug and may be blocked by event-driven processes, making it unable to receive breakpoint requests from the IDE. If xdebug is a multi-threaded model, it is possible to add breakpoints after the program has started running
Please answer these questions before submitting your issue.
Trying to use xdebug for step debugging. Steps to reproduce:
I expect it to work like fpm - I can put a breakpoint anywhere at any time, refresh the page and the app will stop.
When i make a breakpoint in controller and open a page in browser, it randomly stops or not. Restart of the application randomly changes the situation - breakpoint may become work or broken.
php --ri swoole
)?Swoole 5.0.2 Installed via compilation commit 6809ae4
uname -a
&php -v
&gcc -v
) ?PHP docker image: php:8.1.6-fpm-alpine3.16 Kernel: 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 Linux
Dockerfile