View Issue Details

IDProjectCategoryView StatusLast Update
0001562XdebugStacktracespublic2023-11-30 14:49
Reportermpociot Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Target Version3.3devFixed in Version3.3.0 
Summary0001562: Add 'local_vars' option to 'xdebug_get_function_stack' to include variables for each st
Description

It would be great if Xdebug would have the ability to return the local variables from a stack trace frame.
The use case I have in mind:

I setup a custom exception handler to handle errors in my application. When I retrieve an exception, I want to be able to call xdebug_get_function_stack(); and retrieve the stack trace. This stack trace should then contain the local variables for each frame in the stacktrace.

So you can think of it as something like show_local_vars but not only for the top-most scope, but for all scopes in the stack trace. And the ability to retrieve these values with a function call.

TagsNo tags attached.
Operating System
PHP Version7.2.0-7.2.4

Activities