-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] get where "exit" was called/shutdown started #17505
Comments
Why not propose this as an xdebug feature instead? I don't think there's a technical reason why xdebug cannot intercept exit calls. |
Afaik bc in < PHP 8.4 However this is a common-ish scenario for cases where xdebug isn't easily available. |
Yes, but it had an |
See error report in xdebug https://bugs.xdebug.org/view.php?id=2274 EDIT: which by the way is only helpful if we're not in shutdown already. Checking what calls exit in a shutdown is impossible, since there's nothing that would run after it, therefore can't print/log the output of the function monitor either. The only option would be a breakpoint. |
Description
There currently is no simple way to figure out what/where exit was called.
Since PHP 8.4 PHP is a proper function, however it seems it's xdebug won't break on it, even if set (besides the fact, there's tons of bugs with IDEs/xdebug when breaking on built-in functions, e.g.
defined(
)Stepping through the code until exit; is reached isn't feasible in all cases (it happens in a long running process, this might take a day...)
It would be great if there were a magic constant similar to
__COMPILER_HALT_OFFSET__
that is available in shutdown function callbacks, which includes the last executed file + line in the main thread before shutdown started. But that's just a simple first suggestion, I'm open to everything that makes identifying/debugging this easier.The text was updated successfully, but these errors were encountered: