-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
support Stack locals #990
Comments
Unfortunately this isn't possible today in browser JavaScript. The We've long experimented with making this possible, but short of re-writing your code during a compilation step to expose every conceivable variable to Raven.js (e.g. using a babel plugin) – which would make all but trivial applications pretty much unusable – there's not much we can do. |
And what about Nodejs ? Would it be possible ? |
You're welcome to give it a shot – pull requests are accepted! I've heard that it may be possible to run V8 in some kind of debugging/development mode that could expose local variables, if you wanted to start there. |
it's been a while since we started this convo, but we finally have support for stack locals in NodeJS. If you upgrade Sentry.init({
dsn: "https://[email protected]/0",
includeLocalVariables: true,
}); This only works for NodeJS on v8 - not supported for other JS runtimes (yet). |
Hey! We also released a blog post detailing how this works under the hood if anyone is curious: https://blog.sentry.io/2023/02/01/local-variables-for-nodejs-in-sentry/ |
@AbhiPrasad Are there any plans to port this over to browser JavaScript? I can imagine this would be a huge hit. |
Hey @jackkinsella unfortunately there is no way for us to access this information in the browser - we would love to support it if we could! |
Do you want to request a feature or report a bug?
feature
(If this is a usage question, please do not post it here—post it on forum.sentry.io instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)
What is the expected behavior?
According to the sentry docs,
Why don't we have this in js as well, and preferably also in react native? I think with the
arguments
variable we could log at least the locals of the function generating the exception, which would still be immensely useful.The text was updated successfully, but these errors were encountered: