@@ -20,9 +20,8 @@ registerUpdateReconciler(module);
2020
2121@hotClass ( module )
2222export class GenericVisualizationSupport
23- implements DebugSessionVisualizationSupport
24- {
25- constructor ( private readonly debuggerView : DebuggerViewProxy ) { }
23+ implements DebugSessionVisualizationSupport {
24+ constructor ( private readonly debuggerView : DebuggerViewProxy ) { }
2625
2726 createBackend (
2827 session : DebugSessionProxy
@@ -64,6 +63,18 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
6463 context : this . getContext ( ) ,
6564 } ) ;
6665
66+ const result = parseEvaluationResultFromGenericDebugAdapter (
67+ reply . result ,
68+ {
69+ debugAdapterType :
70+ this . debugSession . session . configuration . type ,
71+ }
72+ ) ;
73+
74+ if ( result . kind === "data" ) {
75+ return result ;
76+ }
77+
6778 // Use structural information about variables
6879 // from the evaluation response if present.
6980 if ( reply . variablesReference ) {
@@ -84,15 +95,9 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
8495 data : graph ,
8596 } ,
8697 } ;
87- } else {
88- return parseEvaluationResultFromGenericDebugAdapter (
89- reply . result ,
90- {
91- debugAdapterType :
92- this . debugSession . session . configuration . type ,
93- }
94- ) ;
9598 }
99+
100+ return result ;
96101 } catch ( error : any ) {
97102 return {
98103 kind : "error" ,
@@ -147,13 +152,13 @@ export class GenericVisualizationBackend extends VisualizationBackendBase {
147152 variablesReference : number ;
148153 depth : number ;
149154 } [ ] = [
150- {
151- source : undefined ,
152- label : rootLabel ,
153- variablesReference : rootVariablesReference ,
154- depth : 0 ,
155- } ,
156- ] ;
155+ {
156+ source : undefined ,
157+ label : rootLabel ,
158+ variablesReference : rootVariablesReference ,
159+ depth : 0 ,
160+ } ,
161+ ] ;
157162
158163 let knownCount : number = 0 ;
159164
0 commit comments