Skip to content

Commit 8d7426e

Browse files
author
Luca Forstner
authored
Add warning about using debuggers with includeLocalVariables (#11138)
1 parent 5242d8b commit 8d7426e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

docs/platforms/javascript/common/configuration/integrations/localvariables.mdx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ _Import name: `Sentry.localVariablesIntegration`_
3434

3535
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
3636

37-
This integration captures local variables to exception frames. To enable capturing local variables via the integration, set `includeLocalVariable: true` in the SDK configuration.
37+
This integration captures local variables to exception frames. To enable capturing local variables via the integration, set `includeLocalVariable` to `true` in the SDK configuration.
3838

3939
```JavaScript
4040
Sentry.init({
@@ -44,12 +44,22 @@ Sentry.init({
4444

4545
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.
4646

47-
<Alert level="warning">
47+
<Alert level="warning" title="Minified Variables">
4848

4949
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.
5050

5151
</Alert>
5252

53+
<Alert level="warning" title="Incompatibility with Debuggers">
54+
55+
Setting `includeLocalVariables` to `true` can and will interfere with other debugger sessions attached to the process.
56+
The integration works by briefly pausing execution on thrown exceptions, to collect variables in the scope and then instantly resuming it.
57+
You may therefore examine your breakpoints being skipped over when this integration is active.
58+
59+
It is recommended to set `includeLocalVariables` to `false` when intending to use other debugger sessions.
60+
61+
</Alert>
62+
5363
## Options
5464

5565
### `captureAllExceptions`

src/components/docPage/type.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@
6666
font-size: 1rem;
6767
}
6868

69-
p code,
69+
p code {
70+
color: var(--codeColor);
71+
margin: 0 2px;
72+
}
73+
7074
li code {
7175
color: var(--codeColor);
7276
}

0 commit comments

Comments
 (0)