提交 272d8dcb 编写于 作者: I isidor

debug: stop and disconnect should also work on a process, even if none focused

上级 8f9a2b0f
......@@ -255,7 +255,11 @@ export class StopAction extends AbstractDebugAction {
}
public run(): TPromise<any> {
const process = this.debugService.getViewModel().focusedProcess;
let process = this.debugService.getViewModel().focusedProcess;
if (!process) {
process = this.debugService.getModel().getProcesses().pop();
}
return process ? process.disconnect(false, true) : TPromise.as(null);
}
......@@ -273,7 +277,11 @@ export class DisconnectAction extends AbstractDebugAction {
}
public run(): TPromise<any> {
const process = this.debugService.getViewModel().focusedProcess;
let process = this.debugService.getViewModel().focusedProcess;
if (!process) {
process = this.debugService.getModel().getProcesses().pop();
}
return process ? process.disconnect(false, true) : TPromise.as(null);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册