Skip to content
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

Add ability to capture variables from all frames #2002

Open
saulshanabrook opened this issue Feb 13, 2023 · 0 comments
Open

Add ability to capture variables from all frames #2002

saulshanabrook opened this issue Feb 13, 2023 · 0 comments

Comments

@saulshanabrook
Copy link

Describe the idea
I am currently using the include_local_variables flag to capture the top frame's variables on an exception. AFAIK there isn't support for capturing variables for all frames, only the top frame. I am curious if it is possible to report variables for all frames in the stack as an option as well.

Why do you think it's beneficial to most of the users

In my case, it would help a ton to debug why an error is occurring to understand how to solve it. For example, there is an exception being raised by an HTTP request, but the part I am trying to understand is how that request was constructed, not why the exception was raised when executing that request (the wrong request is being sent).

Screenshot 2023-02-13 at 6 15 27 PM

Possible implementation

I am not sure if this is possible in Ruby!

I see the current implementation gets the binding using TracePoint, and then gets the variables from that.

I don't know in ruby if you can navigate up the stack in an exception handler like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants