From 4d37b13880923208b9d5576fe8e97bfda0de6a76 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 26 Aug 2024 09:39:05 +0200 Subject: [PATCH] Add warning about using debuggers with `includeLocalVariables` --- .../configuration/integrations/localvariables.mdx | 14 ++++++++++++-- src/components/docPage/type.scss | 6 +++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx index 785fa4876bafe..7afea639cfa5b 100644 --- a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx @@ -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({ @@ -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. - + 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. + + +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. + + + ## Options ### `captureAllExceptions` diff --git a/src/components/docPage/type.scss b/src/components/docPage/type.scss index 8cd809c758d07..6d09646f9885c 100644 --- a/src/components/docPage/type.scss +++ b/src/components/docPage/type.scss @@ -66,7 +66,11 @@ font-size: 1rem; } - p code, + p code { + color: var(--codeColor); + margin: 0 2px; + } + li code { color: var(--codeColor); }