Skip to content

Commit 1b74b74

Browse files
committed
fix: windows rn direct debugging
For some reason, RN on windows seems to return undefined for the value, even though js-debug asks for returnByValue. Handle that. Fixes microsoft/vscode#154976
1 parent 2344223 commit 1b74b74

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
44

55
## Nightly (only)
66

7+
- feat: support providing terminal args as a string to avoid escaping ([#1335](https://github.com/microsoft/vscode-js-debug/issues/1335))
78
- fix: performance improvements for setting breakpoints in large projects ([vscode#153470](https://github.com/microsoft/vscode/issues/153470))
89
- fix: completions not returning stack variables ([vscode#153651](https://github.com/microsoft/vscode/issues/153651))
10+
- fix: react native windows direct debugging not showing variables ([vscode#154976](https://github.com/microsoft/vscode/issues/154976))
11+
- fix: previews showing in some cases `[object Object]` ([#1338](https://github.com/microsoft/vscode-js-debug/issues/1338))
912

1013
## v1.69 (June 2022)
1114

src/adapter/variableStore.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ class VariableContext {
288288
objectId: object.objectId,
289289
throwOnSideEffect: true,
290290
returnByValue: true,
291-
}).catch(() => ({ value: {} as Record<string, string> })),
291+
})
292+
.then(r => r?.value || {})
293+
.catch(() => ({} as Record<string, string>)),
292294
]);
293295
if (!accessorsProperties || !ownProperties) return [];
294296

@@ -327,7 +329,7 @@ class VariableContext {
327329
this.createPropertyVar(
328330
p,
329331
object,
330-
stringyProps.value.hasOwnProperty(p.name) ? stringyProps.value[p.name] : undefined,
332+
stringyProps?.hasOwnProperty(p.name) ? stringyProps[p.name] : undefined,
331333
),
332334
);
333335
}

0 commit comments

Comments
 (0)