Commit 89775d6 1 parent d840528 commit 89775d6 Copy full SHA for 89775d6
File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -936,11 +936,12 @@ export class MI2 extends EventEmitter implements IBackend {
936
936
return this . sendCommand ( `var-evaluate-expression ${ this . quote ( name ) } ` ) ;
937
937
}
938
938
939
- async varListChildren ( name : string ) : Promise < VariableObject [ ] > {
939
+ async varListChildren ( name : string , start ?: number , count ?: number ) : Promise < VariableObject [ ] > {
940
940
if ( trace )
941
941
this . log ( "stderr" , "varListChildren" ) ;
942
- //TODO: add `from` and `to` arguments
943
- const res = await this . sendCommand ( `var-list-children --all-values ${ this . quote ( name ) } ` ) ;
942
+ start ??= 0 ;
943
+ const range = count ? ` ${ start } ${ start + count } ` : "" ;
944
+ const res = await this . sendCommand ( `var-list-children --all-values ${ this . quote ( name ) } ${ range } ` ) ;
944
945
const children = res . result ( "children" ) || [ ] ;
945
946
const omg : VariableObject [ ] = children . map ( ( child : any ) => new VariableObject ( child [ 1 ] ) ) ;
946
947
return omg ;
Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ export class MI2DebugSession extends DebugSession {
565
565
// Variable members
566
566
let children : VariableObject [ ] ;
567
567
try {
568
- children = await this . miDebugger . varListChildren ( id . name ) ;
568
+ children = await this . miDebugger . varListChildren ( id . name , args . start , args . count ) ;
569
569
const vars = children . map ( child => {
570
570
const varId = findOrCreateVariable ( child ) ;
571
571
child . id = varId ;
You can’t perform that action at this time.
0 commit comments