Skip to content
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

Add warning about using debuggers with includeLocalVariables #11138

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ _Import name: `Sentry.localVariablesIntegration`_

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

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

```JavaScript
Sentry.init({
Expand All @@ -42,12 +42,22 @@ Sentry.init({

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.

<Alert level="warning">
<Alert level="warning" title="Minified Variables">

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.

</Alert>

<Alert level="warning" title="Incompatibility with Debuggers">

Setting `includeLocalVariables` to `true` can and will interfere with other debugger sessions attached to the process.
The integration works by briefly pausing execution on thrown exceptions, to collect variables in the scope and then instantly resuming it.
You may therefore examine your breakpoints being skipped over when this integration is active.

It is recommended to set `includeLocalVariables` to `false` when intending to use other debugger sessions.

</Alert>

## Options

### `captureAllExceptions`
Expand Down
6 changes: 5 additions & 1 deletion src/components/docPage/type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@
font-size: 1rem;
}

p code,
p code {
color: var(--codeColor);
margin: 0 2px;
}

li code {
color: var(--codeColor);
}
Expand Down
Loading