File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ declare module 'vscode-debugprotocol' {
54
54
55
55
interface IStackTraceResponseBody {
56
56
stackFrames : DebugProtocol . StackFrame [ ] ;
57
+ totalFrames ?: number ;
57
58
}
58
59
59
60
interface IScopesResponseBody {
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
460
460
// Only process at the requested number of frames, if 'levels' is specified
461
461
let stack = this . _currentStack ;
462
462
if ( args . levels ) {
463
- stack = this . _currentStack . filter ( ( _ , i ) => i < args . levels ) ;
463
+ stack = this . _currentStack . filter ( ( _ , i ) => args . startFrame <= i && i < args . startFrame + args . levels ) ;
464
464
}
465
465
466
466
const stackFrames : DebugProtocol . StackFrame [ ] = stack
@@ -515,15 +515,15 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
515
515
// or eval script. If its source has a name, it's probably an anonymous function.
516
516
const frameName = callFrame . functionName || ( script && script . url ? '(anonymous function)' : '(eval code)' ) ;
517
517
return {
518
- id : i ,
518
+ id : args . startFrame + i ,
519
519
name : frameName ,
520
520
source : source ,
521
521
line : callFrame . location . lineNumber ,
522
522
column : callFrame . location . columnNumber
523
523
} ;
524
524
} ) ;
525
525
526
- return { stackFrames } ;
526
+ return { stackFrames : stackFrames , totalFrames : this . _currentStack . length } ;
527
527
}
528
528
529
529
public scopes ( args : DebugProtocol . ScopesArguments ) : DebugProtocol . IScopesResponseBody {
You can’t perform that action at this time.
0 commit comments