From dbd53d09c8a1cd23677a6fa1b05c975ef5d8c7e2 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 27 Feb 2024 11:09:22 +0100 Subject: [PATCH 1/5] fix(node): Record local variables if they're falsy --- .../LocalVariables/local-variables-caught.js | 3 +++ .../LocalVariables/local-variables-caught.mjs | 3 +++ .../local-variables-memory-test.js | 3 +++ .../LocalVariables/local-variables.js | 3 +++ .../LocalVariables/no-local-variables.js | 3 +++ .../suites/public-api/LocalVariables/test.ts | 3 +++ .../local-variables/local-variables-async.ts | 6 +++--- .../local-variables/local-variables-sync.ts | 17 +++++++++-------- .../local-variables/local-variables-async.ts | 6 +++--- .../local-variables/local-variables-sync.ts | 17 +++++++++-------- 10 files changed, 42 insertions(+), 22 deletions(-) diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js index 7c86004da43b..17923fe3ca46 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js @@ -20,6 +20,9 @@ function one(name) { name, num: 5, }; + const bool = false; + const num = 0; + const str = ''; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs index 37e5966bc575..ed6032a0b84d 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs @@ -22,6 +22,9 @@ function one(name) { functionsShouldNotBeIncluded: () => {}, functionsShouldNotBeIncluded2() {}, }; + const bool = false; + const num = 0; + const str = ''; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js index 58d838ae08cf..92d940927547 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js @@ -22,6 +22,9 @@ function one(name) { name, num: 5, }; + const bool = false; + const num = 0; + const str = ''; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js index 4a16ad89b5aa..11ebbd610fb0 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js @@ -24,6 +24,9 @@ function one(name) { name, num: 5, }; + const bool = false; + const num = 0; + const str = ''; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js index f01e33a9cafa..88dadf0f853f 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js @@ -23,6 +23,9 @@ function one(name) { name, num: 5, }; + const bool = false; + const num = 0; + const str = ''; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts index 50dd06dfcd3b..cc63d88bb73f 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts @@ -16,6 +16,9 @@ const EXPECTED_LOCAL_VARIABLES_EVENT = { arr: [1, '2', null], obj: { name: 'some name', num: 5 }, ty: '', + bool: false, + num: 0, + str: '', }, }), expect.objectContaining({ diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts index db065466e82a..0276f3ba4f8f 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts @@ -42,9 +42,9 @@ async function unrollObject(session: Session, objectId: string, name: string, va } function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { - if (prop?.value?.value) { + if (prop?.value?.value != null) { vars[prop.name] = prop.value.value; - } else if (prop?.value?.description && prop?.value?.type !== 'function') { + } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } } @@ -63,7 +63,7 @@ async function getLocalVariables(session: Session, objectId: string): Promise this._unrollObject(id, prop.name, vars, next)); - } else if (prop?.value?.value || prop?.value?.description) { + } else if (prop?.value?.value != null || prop?.value?.description != null) { add(vars => this._unrollOther(prop, vars, next)); } } @@ -191,9 +191,9 @@ class AsyncSession implements DebugSession { * Unrolls other properties */ private _unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables, next: (vars: Variables) => void): void { - if (prop?.value?.value) { + if (prop?.value?.value != null) { vars[prop.name] = prop.value.value; - } else if (prop?.value?.description && prop?.value?.type !== 'function') { + } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } @@ -268,11 +268,12 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add(frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add( + frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } diff --git a/packages/node/src/integrations/local-variables/local-variables-async.ts b/packages/node/src/integrations/local-variables/local-variables-async.ts index 0d04f1f0b6e1..1bc8e6b92449 100644 --- a/packages/node/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node/src/integrations/local-variables/local-variables-async.ts @@ -42,9 +42,9 @@ async function unrollObject(session: Session, objectId: string, name: string, va } function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { - if (prop?.value?.value) { + if (prop?.value?.value != null) { vars[prop.name] = prop.value.value; - } else if (prop?.value?.description && prop?.value?.type !== 'function') { + } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } } @@ -63,7 +63,7 @@ async function getLocalVariables(session: Session, objectId: string): Promise this._unrollObject(id, prop.name, vars, next)); - } else if (prop?.value?.value || prop?.value?.description) { + } else if (prop?.value?.value != null || prop?.value?.description != null) { add(vars => this._unrollOther(prop, vars, next)); } } @@ -192,9 +192,9 @@ class AsyncSession implements DebugSession { * Unrolls other properties */ private _unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables, next: (vars: Variables) => void): void { - if (prop?.value?.value) { + if (prop?.value?.value != null) { vars[prop.name] = prop.value.value; - } else if (prop?.value?.description && prop?.value?.type !== 'function') { + } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } @@ -269,11 +269,12 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add(frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add( + frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } From e61f83b8b344469c29d8f03235e1e5f2deb2bbf3 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 27 Feb 2024 11:15:42 +0100 Subject: [PATCH 2/5] formatting --- .../local-variables/local-variables-sync.ts | 11 +++++------ .../local-variables/local-variables-sync.ts | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts index 9e9f61b0d0e5..a25b4200d8dd 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts @@ -268,12 +268,11 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add( - frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add(frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } diff --git a/packages/node/src/integrations/local-variables/local-variables-sync.ts b/packages/node/src/integrations/local-variables/local-variables-sync.ts index 2394ec5b3862..1aa827c55714 100644 --- a/packages/node/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node/src/integrations/local-variables/local-variables-sync.ts @@ -269,12 +269,11 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add( - frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add(frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } From 663dc7341ba03137817c492304fc10af17f2931b Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 27 Feb 2024 10:44:49 +0000 Subject: [PATCH 3/5] Include nulls --- .../local-variables/local-variables-async.ts | 16 ++++++++++++---- .../local-variables/local-variables-sync.ts | 16 +++++++++++----- .../local-variables/local-variables-async.ts | 16 ++++++++++++---- .../local-variables/local-variables-sync.ts | 16 +++++++++++----- 4 files changed, 46 insertions(+), 18 deletions(-) diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts index 0276f3ba4f8f..533dc2908d8e 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts @@ -42,9 +42,17 @@ async function unrollObject(session: Session, objectId: string, name: string, va } function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { - if (prop?.value?.value != null) { - vars[prop.name] = prop.value.value; - } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { + if (!prop.value) { + return; + } + + if ('value' in prop.value) { + if (prop.value.value === undefined || prop.value.value === null) { + vars[prop.name] = `<${prop.value.value}>`; + } else { + vars[prop.name] = prop.value.value; + } + } else if (prop.value.description && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } } @@ -63,7 +71,7 @@ async function getLocalVariables(session: Session, objectId: string): Promise this._unrollObject(id, prop.name, vars, next)); - } else if (prop?.value?.value != null || prop?.value?.description != null) { + } else if (prop?.value) { add(vars => this._unrollOther(prop, vars, next)); } } @@ -191,10 +191,16 @@ class AsyncSession implements DebugSession { * Unrolls other properties */ private _unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables, next: (vars: Variables) => void): void { - if (prop?.value?.value != null) { - vars[prop.name] = prop.value.value; - } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { - vars[prop.name] = `<${prop.value.description}>`; + if (prop.value) { + if ('value' in prop.value) { + if (prop.value.value === undefined || prop.value.value === null) { + vars[prop.name] = `<${prop.value.value}>`; + } else { + vars[prop.name] = prop.value.value; + } + } else if (prop.value.description && prop.value.type !== 'function') { + vars[prop.name] = `<${prop.value.description}>`; + } } next(vars); diff --git a/packages/node/src/integrations/local-variables/local-variables-async.ts b/packages/node/src/integrations/local-variables/local-variables-async.ts index 1bc8e6b92449..5f95f2dc1d02 100644 --- a/packages/node/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node/src/integrations/local-variables/local-variables-async.ts @@ -42,9 +42,17 @@ async function unrollObject(session: Session, objectId: string, name: string, va } function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { - if (prop?.value?.value != null) { - vars[prop.name] = prop.value.value; - } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { + if (!prop.value) { + return; + } + + if ('value' in prop.value) { + if (prop.value.value === undefined || prop.value.value === null) { + vars[prop.name] = `<${prop.value.value}>`; + } else { + vars[prop.name] = prop.value.value; + } + } else if (prop.value.description && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; } } @@ -63,7 +71,7 @@ async function getLocalVariables(session: Session, objectId: string): Promise this._unrollObject(id, prop.name, vars, next)); - } else if (prop?.value?.value != null || prop?.value?.description != null) { + } else if (prop?.value) { add(vars => this._unrollOther(prop, vars, next)); } } @@ -192,10 +192,16 @@ class AsyncSession implements DebugSession { * Unrolls other properties */ private _unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables, next: (vars: Variables) => void): void { - if (prop?.value?.value != null) { - vars[prop.name] = prop.value.value; - } else if (prop?.value?.description != null && prop?.value?.type !== 'function') { - vars[prop.name] = `<${prop.value.description}>`; + if (prop.value) { + if ('value' in prop.value) { + if (prop.value.value === undefined || prop.value.value === null) { + vars[prop.name] = `<${prop.value.value}>`; + } else { + vars[prop.name] = prop.value.value; + } + } else if (prop.value.description && prop.value.type !== 'function') { + vars[prop.name] = `<${prop.value.description}>`; + } } next(vars); From 8abd88dca12559ae30b7fe1f71a2c380212cd071 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 27 Feb 2024 13:30:35 +0100 Subject: [PATCH 4/5] fix `undefiend` --- .../LocalVariables/local-variables-caught.js | 2 ++ .../LocalVariables/local-variables-caught.mjs | 2 ++ .../LocalVariables/local-variables-memory-test.js | 2 ++ .../public-api/LocalVariables/local-variables.js | 2 ++ .../LocalVariables/no-local-variables.js | 2 ++ .../suites/public-api/LocalVariables/test.ts | 2 ++ .../local-variables/local-variables-async.ts | 4 +++- .../local-variables/local-variables-sync.ts | 15 +++++++++------ .../local-variables/local-variables-async.ts | 4 +++- .../local-variables/local-variables-sync.ts | 15 +++++++++------ 10 files changed, 36 insertions(+), 14 deletions(-) diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js index 17923fe3ca46..8ea8dd93fb4d 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js @@ -23,6 +23,8 @@ function one(name) { const bool = false; const num = 0; const str = ''; + const something = undefined; + const somethingElse = null; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs index ed6032a0b84d..a7427ac60157 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs @@ -25,6 +25,8 @@ function one(name) { const bool = false; const num = 0; const str = ''; + const something = undefined; + const somethingElse = null; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js index 92d940927547..35c71a3fc6e8 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-memory-test.js @@ -25,6 +25,8 @@ function one(name) { const bool = false; const num = 0; const str = ''; + const something = undefined; + const somethingElse = null; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js index 11ebbd610fb0..8b64c80cbc5f 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js @@ -27,6 +27,8 @@ function one(name) { const bool = false; const num = 0; const str = ''; + const something = undefined; + const somethingElse = null; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js index 88dadf0f853f..2857fc0e3ce9 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js @@ -26,6 +26,8 @@ function one(name) { const bool = false; const num = 0; const str = ''; + const something = undefined; + const somethingElse = null; const ty = new Some(); diff --git a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts index cc63d88bb73f..3a8d904de3c9 100644 --- a/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts @@ -19,6 +19,8 @@ const EXPECTED_LOCAL_VARIABLES_EVENT = { bool: false, num: 0, str: '', + something: '', + somethingElse: '', }, }), expect.objectContaining({ diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts index 533dc2908d8e..baeeb4866be4 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-async.ts @@ -52,8 +52,10 @@ function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { } else { vars[prop.name] = prop.value.value; } - } else if (prop.value.description && prop.value.type !== 'function') { + } else if ('description' in prop.value && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; + } else if (prop.value.type === 'undefined') { + vars[prop.name] = ''; } } diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts index bac1c9a1ac09..70fc08744686 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts @@ -198,8 +198,10 @@ class AsyncSession implements DebugSession { } else { vars[prop.name] = prop.value.value; } - } else if (prop.value.description && prop.value.type !== 'function') { + } else if ('description' in prop.value && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; + } else if (prop.value.type === 'undefined') { + vars[prop.name] = ''; } } @@ -274,11 +276,12 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add(frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add( + frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } diff --git a/packages/node/src/integrations/local-variables/local-variables-async.ts b/packages/node/src/integrations/local-variables/local-variables-async.ts index 5f95f2dc1d02..fee8937af91d 100644 --- a/packages/node/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node/src/integrations/local-variables/local-variables-async.ts @@ -52,8 +52,10 @@ function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { } else { vars[prop.name] = prop.value.value; } - } else if (prop.value.description && prop.value.type !== 'function') { + } else if ('description' in prop.value && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; + } else if (prop.value.type === 'undefined') { + vars[prop.name] = ''; } } diff --git a/packages/node/src/integrations/local-variables/local-variables-sync.ts b/packages/node/src/integrations/local-variables/local-variables-sync.ts index 5edfb62a4cf3..011937462d24 100644 --- a/packages/node/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node/src/integrations/local-variables/local-variables-sync.ts @@ -199,8 +199,10 @@ class AsyncSession implements DebugSession { } else { vars[prop.name] = prop.value.value; } - } else if (prop.value.description && prop.value.type !== 'function') { + } else if ('description' in prop.value && prop.value.type !== 'function') { vars[prop.name] = `<${prop.value.description}>`; + } else if (prop.value.type === 'undefined') { + vars[prop.name] = ''; } } @@ -275,11 +277,12 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add(frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add( + frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } From 86348f1ce6e1d25bdcc96aeea6075d23a3a7349d Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 27 Feb 2024 13:34:33 +0100 Subject: [PATCH 5/5] formatting again :( --- .../local-variables/local-variables-sync.ts | 11 +++++------ .../local-variables/local-variables-sync.ts | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts index 70fc08744686..1b8d3c356187 100644 --- a/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node-experimental/src/integrations/local-variables/local-variables-sync.ts @@ -276,12 +276,11 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add( - frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add(frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } } diff --git a/packages/node/src/integrations/local-variables/local-variables-sync.ts b/packages/node/src/integrations/local-variables/local-variables-sync.ts index 011937462d24..e1ec4b57023c 100644 --- a/packages/node/src/integrations/local-variables/local-variables-sync.ts +++ b/packages/node/src/integrations/local-variables/local-variables-sync.ts @@ -277,12 +277,11 @@ const _localVariablesSyncIntegration = (( }); } else { const id = localScope.object.objectId; - add( - frames => - session?.getLocalVariables(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - }), + add(frames => + session?.getLocalVariables(id, vars => { + frames[i] = { function: fn, vars }; + next(frames); + }), ); } }