1

How can I automatically capture local variables from Nodejs for sending to Sentry, like in the Python client?
I'm using Nodejs v12 and Express framework.
And how can I automatically capture local variables from Front-End, React.js?

Tim Babych
  • 3,356
  • 1
  • 20
  • 13
lb777
  • 53
  • 5
  • 1
    Please show relevant code and show EXACTLY what you're trying to capture and send. Generically, Javascript does not provide any way to iterate local variables. So, we need more specific information about what you're trying to do including relevant code in order to have any change of helping. – jfriend00 Feb 21 '20 at 12:53
  • I want to see data like [this](https://downloader.disk.yandex.ru/preview/065fd0551693dab775437c9f42dbe4f90e598d59435140dcecdc77b19bb559b9/5e500f39/sxR5QLoBi8Or88SxMu0dp-yRDdlK-fkiadL9WpoivoUdIfbvjx3HL9iJs2SksRfQBrqnIhTw4ntzPwxtuK7AOA==?uid=0&filename=Screenshot+from+2020-02-21+16-04-59.png&disposition=inline&hash=&limit=0&content_type=image%2Fpng&tknv=v2&owner_uid=1130000027952007&size=2048x2048) , but I don't know how to properly configure the Nodejs client for this. – lb777 Feb 21 '20 at 13:13
  • What you're showing there in that link appears to be python code. It's unclear what that has to do with nodejs or local variables. Still don't know what you're trying to do. – jfriend00 Feb 21 '20 at 13:17

1 Answers1

1

Sentry has a ticket on this, https://github.com/getsentry/sentry-javascript/issues/990. They made no progress on it because getting names and values of local variables in JS is barely possible. Getting All Variables In Scope

Tim Babych
  • 3,356
  • 1
  • 20
  • 13