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

[BTRACE-78] Ability to find values of local variables when reaching specific line number using @Location #25

Closed
jbachorik opened this issue Aug 28, 2014 · 7 comments

Comments

@jbachorik
Copy link
Collaborator

[reporter="jerusalemer", created="Thu, 13 Oct 2011 18:18:22 +0200"]

The existing ability to go a specific line in method can become much more usable if there is an ability to find out the values of local variables at that specific line.

@jbachorik jbachorik added this to the 1.3 milestone Aug 28, 2014
@jbachorik
Copy link
Collaborator Author

[author="j.bachorik", created="Fri, 11 May 2012 18:44:43 +0200"]

Probably could be achieved but it wouldn't work 100%. You would need the class data with debugging symbols in order to match the stack pointer to a local variable name.
Definitely not for 1.2.*

@jbachorik
Copy link
Collaborator Author

[author="grnch", created="Fri, 14 Mar 2014 14:06:02 +0100"]

Are there still any plans to implement this?

Please consider doing this, it would be an absolutely killer feature.

It would essentially complete the cycle and turn BTrace into a full fledged "programmable read-only debugger" for production instances. It would be indispensable for those weird bugs that you cannot reproduce on test servers, and if you just knew the value of that one local variable on the production server it would give you a clue what the problem is.

It would be fine if this feature only works with classes that have debug symbols, the probe can just fail if the class does not have debug info.

@jbachorik
Copy link
Collaborator Author

[author="grnch", created="Fri, 14 Mar 2014 14:07:02 +0100"]

Or as a fall back you could maybe provide all local variables in an AnyType[] array, similar to how method parameters are provided? After all, method parameters and local variables sit in the same array on the JVM stack frame.

That way even without the names of local variables you could at least guess which slot in the array corresponds to which local var, with a little experimentation.

But this is less important, even a simpler implementation that just fails when there is no debug info would be great.

@jbachorik jbachorik removed this from the 1.3 milestone Jan 26, 2015
@jbachorik jbachorik added this to the 1.4.0 milestone Mar 8, 2016
@jbachorik jbachorik self-assigned this Mar 8, 2016
@whitelilis
Copy link

I'm looking for this feature, then see this issue. I wish it will come soon.

@lawnight
Copy link

this's a great feature.hope come soon.

@kylemeow
Copy link

kylemeow commented Jul 1, 2019

+1 for this feature : )

@jbachorik jbachorik removed this from the 1.4.0 milestone Feb 3, 2020
@github-actions
Copy link

Stale issue message

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

4 participants