From e48948b745013913a5085c03c64fa07cec2d7b41 Mon Sep 17 00:00:00 2001 From: Christopher Dwyer-Perkins Date: Thu, 14 Nov 2024 16:41:07 -0400 Subject: [PATCH] attempting to ask for and use virtual variables --- src/debugProtocol/client/DebugProtocolClient.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/debugProtocol/client/DebugProtocolClient.ts b/src/debugProtocol/client/DebugProtocolClient.ts index 16d21aac..84064208 100644 --- a/src/debugProtocol/client/DebugProtocolClient.ts +++ b/src/debugProtocol/client/DebugProtocolClient.ts @@ -152,6 +152,10 @@ export class DebugProtocolClient { return semver.satisfies(this.protocolVersion, '>=3.2.0'); } + public get supportsVirtualVariables() { + return semver.satisfies(this.protocolVersion, '>=3.3.0'); + } + /** * Get a promise that resolves after an event occurs exactly once */ @@ -474,10 +478,12 @@ export class DebugProtocolClient { threadIndex: threadIndex, stackFrameIndex: stackFrameIndex, getChildKeys: true, + getVirtualKeys: this.supportsVirtualVariables, variablePathEntries: variablePathEntries.map(x => ({ //remove leading and trailing quotes name: x.replace(/^"/, '').replace(/"$/, ''), - forceCaseInsensitive: !x.startsWith('"') && !x.endsWith('"') + forceCaseInsensitive: !x.startsWith('"') && !x.endsWith('"'), + isVirtual: x.startsWith('$') })), //starting in protocol v3.1.0, it supports marking certain path items as case-insensitive (i.e. parts of DottedGet expressions) enableForceCaseInsensitivity: semver.satisfies(this.protocolVersion, '>=3.1.0') && variablePathEntries.length > 0