Closed zainengineer closed 1 year ago
You could just d(xdebug_get_function_stack());
. I'd need to write a new plugin to support it like a normal backtrace. If you feel like writing one yourself that's also cool
Looking at this in depth (After all this time, yeah I know) the main difference between this and debug_backtrace()
seems to be that this will include PHP internal functions that are omitted from normal backtraces and preserve the "Stack" in a shutdown handler yes?
Otherwise it just seems to be a reversed backtrace with string representations of parameters and no object key. Applying any "Special" transformations to this like we do to debug_backtrace
would just blow away any extra information you might get out of it (Since any extra info would just be internal functions without source code to show)
If anyone still wants to implement this third party take a look at TracePlugin
for reference, but it's one of the more complex ones.
is it possible to have a configuration which uses
xdebug_get_function_stack
instead ofdebug_backtrace
? https://github.com/kint-php/kint/blob/b091715eadaf6e1a7ef927f3e81d1004611d2aea/src/Kint.php#L192Its useful if you want to print trace inside fatal errors.
easy to see stack trace inside fatal errors.