You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/localvariables.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,22 @@ Sentry.init({
44
44
45
45
The local variables integration only captures local variables from application code (`in_app = true`). Frames of a stacktrace originating from `node_modules` will not have local variables attached to them.
46
46
47
+
<Alertlevel="warning"title="Issues with ESM">
48
+
49
+
Due to an [open Node.js issue](https://github.com/nodejs/node/issues/38439), we are currently unable to capture local variables for unhandled errors when using JavaScript modules (ESM).
50
+
51
+
To work around this, wrap relevant code in a try-catch block and call `captureException` with the error so that Sentry can capture local variables.
52
+
53
+
```javascript
54
+
try {
55
+
// Your code here
56
+
} catch (error) {
57
+
Sentry.captureException(error);
58
+
}
59
+
```
60
+
61
+
</Alert>
62
+
47
63
<Alertlevel="warning"title="Minified Variables">
48
64
49
65
Minified local variable names attached to exception frames can't be unminified by Sentry at this time. There's an [active proposal](https://github.com/tc39/source-map/blob/main/proposals/scopes.md) for the sourcemaps spec that will add this capability.
Set this boolean to `true` to add stack local variables to stack traces.
248
+
Set this boolean to `true` to add stack local variables to stack traces. Defaults to `false`.
249
249
250
-
<Alertlevel="warning">
251
-
252
-
Due to an [open Node.js issue](https://github.com/nodejs/node/issues/38439), we are currently unable to capture local variables for unhandled errors when using
253
-
JavaScript modules (ESM).
254
-
255
-
See the <PlatformLinkto="/configuration/integrations/localvariables">integration options</PlatformLink> for a workaround.
256
-
257
-
</Alert>
250
+
For more advanced configuration options, see the documentation on the <PlatformLinkto="/configuration/integrations/localvariables">Local Variables integration options</PlatformLink>.
0 commit comments