MCPcopy Create free account
hub / github.com/Marus/cortex-debug / toProtocolVariable

Method toProtocolVariable

src/backend/backend.ts:128–143  ·  view source on GitHub ↗
(newName?: string)

Source from the content-addressed store, hash-verified

126 }
127
128 public toProtocolVariable(newName?: string): DebugProtocol.Variable {
129 const res: DebugProtocol.Variable = {
130 name: newName || this.exp,
131 evaluateName: this.fullExp || this.exp,
132 value: (this.value === void 0) ? '<unknown>' : this.value,
133 type: this.type,
134 presentationHint: {
135 kind: this.displayhint
136 },
137 variablesReference: this.id
138 };
139 this.tryAddMemoryReference(res);
140
141 res.type = this.createToolTip(res.name, res.value); // This ends up becoming a tool-tip
142 return res;
143 }
144
145 public toProtocolEvaluateResponseBody(): DebugProtocol.EvaluateResponse['body'] {
146 const res: DebugProtocol.EvaluateResponse['body'] = {

Callers 3

variablesRequestMethod · 0.80

Calls 2

tryAddMemoryReferenceMethod · 0.95
createToolTipMethod · 0.95

Tested by

no test coverage detected