Skip to content

Could we capture the value of function args? #5581

Answered by AbhiPrasad
meotimdihia asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! As per #990, the JavaScript language itself (so browser, Node, etc.) does not support automatically capturing stack locals when capturing an error, like it does for python for example.

For now, you can manually attach any function arguments using context, and attach them to events. For example:

Sentry.setContext("testFunctionArgs", { a, b, c });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by meotimdihia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants