@@ -20,9 +20,8 @@ registerUpdateReconciler(module);
|
|||||||
|
|
||||||
@hotClass(module)
|
@hotClass(module)
|
||||||
export class GenericVisualizationSupport
|
export class GenericVisualizationSupport
|
||||||
implements DebugSessionVisualizationSupport
|
implements DebugSessionVisualizationSupport {
|
||||||
{
|
constructor(private readonly debuggerView: DebuggerViewProxy) { }
|
||||||
constructor(private readonly debuggerView: DebuggerViewProxy) {}
|
|
||||||
|
|
||||||
createBackend(
|
createBackend(
|
||||||
session: DebugSessionProxy
|
session: DebugSessionProxy
|
||||||
@@ -64,6 +63,18 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
|
|||||||
context: this.getContext(),
|
context: this.getContext(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const result = parseEvaluationResultFromGenericDebugAdapter(
|
||||||
|
reply.result,
|
||||||
|
{
|
||||||
|
debugAdapterType:
|
||||||
|
this.debugSession.session.configuration.type,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result.kind === "data") {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// Use structural information about variables
|
// Use structural information about variables
|
||||||
// from the evaluation response if present.
|
// from the evaluation response if present.
|
||||||
if (reply.variablesReference) {
|
if (reply.variablesReference) {
|
||||||
@@ -84,15 +95,9 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
|
|||||||
data: graph,
|
data: graph,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
return parseEvaluationResultFromGenericDebugAdapter(
|
|
||||||
reply.result,
|
|
||||||
{
|
|
||||||
debugAdapterType:
|
|
||||||
this.debugSession.session.configuration.type,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
return {
|
return {
|
||||||
kind: "error",
|
kind: "error",
|
||||||
@@ -147,13 +152,13 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
|
|||||||
variablesReference: number;
|
variablesReference: number;
|
||||||
depth: number;
|
depth: number;
|
||||||
}[] = [
|
}[] = [
|
||||||
{
|
{
|
||||||
source: undefined,
|
source: undefined,
|
||||||
label: rootLabel,
|
label: rootLabel,
|
||||||
variablesReference: rootVariablesReference,
|
variablesReference: rootVariablesReference,
|
||||||
depth: 0,
|
depth: 0,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
let knownCount: number = 0;
|
let knownCount: number = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user