Skip to content

Commit

Permalink
attempting to ask for and use virtual variables
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdp committed Nov 14, 2024
1 parent 6add727 commit e48948b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/debugProtocol/client/DebugProtocolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e48948b

Please sign in to comment.