View Issue Details
|Docker/Linux on MacOS
|0002161: Breakpoints not updated when process is running
When a PHP is process is already running and you add a new breakpoint, it will never be triggered unless a script is restarted.
With the rise of popularity of Swoole, RoadRunner, AmPHP and related tools like Laravel Octane, this becomes increasingly more of a problem because debugging gets much harder. In case of Swoole, they've recently added support for XDebug, but it's still hard to actually make use of it because of having to constantly restart the server to make it reload the breakpoints.
There are workarounds for that, but all are suboptimal:
Are there any possible workarounds XDebug can implement to address this issue?
|Steps To Reproduce
Ask me if you want me to prepare a repository to reproduce this.
|No tags attached.
This is not a simple thing to change. Right now, the protocol very much works in a command -> response fashion, where each time Xdebug has paused the script (which includes the state when it starts), an IDE can send more commands (including setting breakpoints). Once the IDE sends a "run" Xdebug will then run until 1. the script has ended; or 2. a breakpoint has been hit. During that time, Xdebug can also send the IDE notifications, but there is no way for Xdebug to receive data as it is not implemented as an asynchronous protocol. Changing that would require a lot of work, on both the Xdebug side, as well as on the IDEs sides.
A workaround would be for you to introduce