Skip to content

Enable loading more than 20 call frames #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/custom-typings/debugProtocolExtensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ declare module 'vscode-debugprotocol' {

interface IStackTraceResponseBody {
stackFrames: DebugProtocol.StackFrame[];
totalFrames?: number;
}

interface IScopesResponseBody {
Expand Down
6 changes: 3 additions & 3 deletions src/debug-adapter/webKitDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
// Only process at the requested number of frames, if 'levels' is specified
let stack = this._currentStack;
if (args.levels) {
stack = this._currentStack.filter((_, i) => i < args.levels);
stack = this._currentStack.filter((_, i) => args.startFrame <= i && i < args.startFrame + args.levels);
}

const stackFrames: DebugProtocol.StackFrame[] = stack
Expand Down Expand Up @@ -515,15 +515,15 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
// or eval script. If its source has a name, it's probably an anonymous function.
const frameName = callFrame.functionName || (script && script.url ? '(anonymous function)' : '(eval code)');
return {
id: i,
id: args.startFrame + i,
name: frameName,
source: source,
line: callFrame.location.lineNumber,
column: callFrame.location.columnNumber
};
});

return { stackFrames };
return { stackFrames: stackFrames, totalFrames: this._currentStack.length };
}

public scopes(args: DebugProtocol.ScopesArguments): DebugProtocol.IScopesResponseBody {
Expand Down