View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002161 | Xdebug | Step Debugging | public | 2023-02-23 13:50 | 2024-08-07 13:41 |
Reporter | Alex_Wells | Assigned To | derick | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Platform | Docker/Linux on MacOS | OS | Linux | ||
Product Version | 3.2.0 | ||||
Target Version | 3.4dev | ||||
Summary | 0002161: Breakpoints not updated when process is running | ||||
Description | 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 | See https://github.com/swoole/swoole-src/issues/4969 Ask me if you want me to prepare a repository to reproduce this. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.1.5-8.1.9 | ||||
|
Hi, 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 cheers, |
|
I have made an experimental implementation of a "control socket" (https://bugs.xdebug.org/view.php?id=2219), that could be used to inject new breakpoints. Once IDEs have support for this, I will write up how this works, and how to use it. |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-02-23 13:50 | Alex_Wells | New Issue | |
2023-08-01 10:08 | derick | Severity | minor => feature |
2023-08-01 10:08 | derick | Note Added: 0006622 | |
2023-08-01 10:08 | derick | Assigned To | => derick |
2023-08-01 10:08 | derick | Status | new => acknowledged |
2024-04-15 13:26 | derick | Note Added: 0006903 | |
2024-08-07 13:41 | derick | Target Version | => 3.4dev |