File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 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' {
5454
5555 interface IStackTraceResponseBody {
5656 stackFrames : DebugProtocol . StackFrame [ ] ;
57+ totalFrames ?: number ;
5758 }
5859
5960 interface IScopesResponseBody {
Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
460460 // Only process at the requested number of frames, if 'levels' is specified
461461 let stack = this . _currentStack ;
462462 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 ) ;
464464 }
465465
466466 const stackFrames : DebugProtocol . StackFrame [ ] = stack
@@ -515,15 +515,15 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
515515 // or eval script. If its source has a name, it's probably an anonymous function.
516516 const frameName = callFrame . functionName || ( script && script . url ? '(anonymous function)' : '(eval code)' ) ;
517517 return {
518- id : i ,
518+ id : args . startFrame + i ,
519519 name : frameName ,
520520 source : source ,
521521 line : callFrame . location . lineNumber ,
522522 column : callFrame . location . columnNumber
523523 } ;
524524 } ) ;
525525
526- return { stackFrames } ;
526+ return { stackFrames : stackFrames , totalFrames : this . _currentStack . length } ;
527527 }
528528
529529 public scopes ( args : DebugProtocol . ScopesArguments ) : DebugProtocol . IScopesResponseBody {
You can’t perform that action at this time.
0 commit comments