diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 0a13e506f4aee5de7d1e96475ab04d1907e4db74..d68f2bc0c4a0412d14511d8984aab4a7805f937a 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -735,6 +735,6 @@ export class FocusProcessAction extends AbstractDebugAction { public run(processName: string): TPromise { const process = this.debugService.getModel().getProcesses().filter(p => p.name === processName).pop(); - return this.debugService.setFocusedStackFrameAndEvaluate(null, process); + return this.debugService.focusStackFrameAndEvaluate(null, process); } } diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index ef63b8fa84e447ca26635724831937ed9f346735..bd1d3b59072dc3c5ad41ef6ba2caf25a8a2d8350 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -372,7 +372,7 @@ export interface IDebugService { /** * Sets the focused stack frame and evaluates all expresions against the newly focused stack frame, */ - setFocusedStackFrameAndEvaluate(focusedStackFrame: IStackFrame, process?: IProcess): TPromise; + focusStackFrameAndEvaluate(focusedStackFrame: IStackFrame, process?: IProcess): TPromise; /** * Adds new breakpoints to the model for the file specified with the uri. Notifies debug adapter of breakpoint changes. diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index e2484e92b20aefe525cdab23be44893442b64a0c..152efc076f4b589c3043de1d0cbf6b2f2abe35dd 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -280,13 +280,13 @@ export class DebugService implements debug.IDebugService { if (callStack.length > 0) { // focus first stack frame from top that has source location const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); - this.setFocusedStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); this.windowService.getWindow().focus(); aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", event.body.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.lineNumber)); return this.openOrRevealSource(stackFrameToFocus.source, stackFrameToFocus.lineNumber, false, false); } else { - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); } }); } @@ -445,7 +445,7 @@ export class DebugService implements debug.IDebugService { return !!this.contextService.getWorkspace(); } - public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame, process?: debug.IProcess): TPromise { + public focusStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame, process?: debug.IProcess): TPromise { const processes = this.model.getProcesses(); if (!process) { process = focusedStackFrame ? focusedStackFrame.thread.process : processes.length ? processes[0] : null; @@ -512,7 +512,7 @@ export class DebugService implements debug.IDebugService { this.telemetryService.publicLog('debugService/addReplExpression'); return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions again since repl evaluation might have changed some. - .then(() => this.setFocusedStackFrameAndEvaluate(this.viewModel.focusedStackFrame)); + .then(() => this.focusStackFrameAndEvaluate(this.viewModel.focusedStackFrame)); } public logToRepl(value: string | { [key: string]: any }, severity?: severity): void { @@ -802,7 +802,7 @@ export class DebugService implements debug.IDebugService { } this.model.removeProcess(session.getId()); - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); this.setStateAndEmit(session.getId(), debug.State.Inactive); if (this.model.getProcesses().length === 0) { @@ -906,7 +906,7 @@ export class DebugService implements debug.IDebugService { private transitionToRunningState(session: RawDebugSession, threadId?: number): void { this.model.clearThreads(session.getId(), false, threadId); this.setStateAndEmit(session.getId(), session.requestType === debug.SessionRequestType.LAUNCH_NO_DEBUG ? debug.State.RunningNoDebug : debug.State.Running); - this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); + this.focusStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError); } private getDebugStringEditorInput(process: debug.IProcess, source: Source, value: string, mtype: string): DebugStringEditorInput { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 307d0814feb65301592b46a63f9ebd2c03b38aab..b115b794f81c8ef727515aa0d5c8068e57c391e8 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -295,7 +295,7 @@ export class CallStackController extends BaseDebugController { process = element; } - this.debugService.setFocusedStackFrameAndEvaluate(stackFrame, process).done(null, errors.onUnexpectedError); + this.debugService.focusStackFrameAndEvaluate(stackFrame, process).done(null, errors.onUnexpectedError); if (stackFrame) { const sideBySide = (event && (event.ctrlKey || event.metaKey)); diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index 7b2f9fddc0d746eb780ff6148be51c0ae95f6e7d..e9b98bbf4eda68587306ef0167e827390561cf93 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -25,7 +25,7 @@ export class MockDebugService implements debug.IDebugService { return null; } - public setFocusedStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise { + public focusStackFrameAndEvaluate(focusedStackFrame: debug.IStackFrame): TPromise { return TPromise.as(null); }