From ffb709205c01c87bdcfe7cae2d19cf06a02f5fd9 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 10 Nov 2016 17:49:14 +0100 Subject: [PATCH] debug: reverse continue in model --- src/vs/workbench/parts/debug/common/debug.ts | 4 +++- .../parts/debug/common/debugModel.ts | 4 ++++ .../debug/electron-browser/rawDebugSession.ts | 21 ++++++++++++------- .../parts/debug/test/common/mockDebug.ts | 4 ++++ 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index db83d02554b..a607ff75060 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -89,9 +89,10 @@ export interface ISession { next(args: DebugProtocol.NextArguments): TPromise; stepIn(args: DebugProtocol.StepInArguments): TPromise; stepOut(args: DebugProtocol.StepOutArguments): TPromise; - stepBack(args: DebugProtocol.StepBackArguments): TPromise; continue(args: DebugProtocol.ContinueArguments): TPromise; pause(args: DebugProtocol.PauseArguments): TPromise; + stepBack(args: DebugProtocol.StepBackArguments): TPromise; + reverseContinue(args: DebugProtocol.ReverseContinueArguments): TPromise; completions(args: DebugProtocol.CompletionsArguments): TPromise; setVariable(args: DebugProtocol.SetVariableArguments): TPromise; @@ -150,6 +151,7 @@ export interface IThread extends ITreeElement { stepBack(): TPromise; continue(): TPromise; pause(): TPromise; + reverseContinue(): TPromise; } export interface IScope extends IExpressionContainer { diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index bc689aa6c2d..e7f4df8fced 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -483,6 +483,10 @@ export class Thread implements debug.IThread { public pause(): TPromise { return this.process.session.pause({ threadId: this.threadId }); } + + public reverseContinue(): TPromise { + return this.process.session.reverseContinue({ threadId: this.threadId }); + } } export class Process implements debug.IProcess { diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index f4009510446..91f86b131bc 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -269,13 +269,6 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { }); } - public stepBack(args: DebugProtocol.StepBackArguments): TPromise { - return this.send('stepBack', args).then(response => { - this.fireFakeContinued(args.threadId); - return response; - }); - } - public continue(args: DebugProtocol.ContinueArguments): TPromise { return this.send('continue', args).then(response => { this.fireFakeContinued(args.threadId); @@ -361,6 +354,20 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { return this.send('evaluate', args); } + public stepBack(args: DebugProtocol.StepBackArguments): TPromise { + return this.send('stepBack', args).then(response => { + this.fireFakeContinued(args.threadId); + return response; + }); + } + + public reverseContinue(args: DebugProtocol.ReverseContinueArguments): TPromise { + return this.send('reverseContinue', args).then(response => { + this.fireFakeContinued(args.threadId); + return response; + }); + } + public getLengthInSeconds(): number { return (new Date().getTime() - this.startTime) / 1000; } diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index e9b98bbf4ed..c589e362310 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -177,6 +177,10 @@ export class MockSession implements debug.ISession { return TPromise.as(null); } + public reverseContinue(args: DebugProtocol.ReverseContinueArguments): TPromise { + return TPromise.as(null); + } + public pause(args: DebugProtocol.PauseArguments): TPromise { return TPromise.as(null); } -- GitLab