Merge from vscode f5044f0910e4aa7e7e06cb509781f3d56e729959 (#4759)

This commit is contained in:
Anthony Dresser
2019-03-29 10:54:38 -07:00
committed by GitHub
parent 37ce37979a
commit a064da642d
25 changed files with 295 additions and 149 deletions

View File

@@ -839,6 +839,11 @@ registerEditorAction(AcceptReplInputAction);
registerEditorAction(ReplCopyAllAction);
class SelectReplActionItem extends FocusSessionActionItem {
protected getActionContext(_: string, index: number): any {
return this.debugService.getModel().getSessions(true)[index];
}
protected getSessions(): ReadonlyArray<IDebugSession> {
return this.debugService.getModel().getSessions(true).filter(s => !sessionsToIgnore.has(s));
}
@@ -856,8 +861,7 @@ class SelectReplAction extends Action {
super(id, label);
}
run(sessionName: string): Promise<any> {
const session = this.debugService.getModel().getSessions(true).filter(p => p.getLabel() === sessionName).pop();
run(session: IDebugSession): Promise<any> {
// If session is already the focused session we need to manualy update the tree since view model will not send a focused change event
if (session && session.state !== State.Inactive && session !== this.debugService.getViewModel().focusedSession) {
this.debugService.focusStackFrame(undefined, undefined, session, true);