提交 97e20be4 编写于 作者: I isidor

debug session become inactive when shutdown. Also more precise listeners for session changes

fixes #58308
上级 2adc5ccc
......@@ -198,15 +198,17 @@ export class FocusSessionActionItem extends SelectActionItem {
this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService));
this.debugService.getViewModel().onDidFocusStackFrame(() => {
this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame(() => {
const session = this.debugService.getViewModel().focusedSession;
if (session) {
const index = this.debugService.getModel().getSessions().indexOf(session);
this.select(index);
}
});
}));
this.toDispose.push(this.debugService.onDidNewSession(() => this.update()));
this.toDispose.push(this.debugService.onDidEndSession(() => this.update()));
this.debugService.getModel().onDidChangeCallStack(() => this.update());
this.update();
}
......
......@@ -131,7 +131,8 @@ export class StartAction extends AbstractDebugAction {
super(id, label, 'debug-action start', debugService, keybindingService);
this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(() => this.updateEnablement()));
this.toDispose.push(this.debugService.getModel().onDidChangeCallStack(() => this.updateEnablement()));
this.toDispose.push(this.debugService.onDidNewSession(() => this.updateEnablement()));
this.toDispose.push(this.debugService.onDidEndSession(() => this.updateEnablement()));
this.toDispose.push(this.contextService.onDidChangeWorkbenchState(() => this.updateEnablement()));
}
......
......@@ -725,6 +725,7 @@ export class DebugSession implements IDebugSession {
dispose(this.rawListeners);
this.model.clearThreads(this.getId(), true);
this.model.removeSession(this.getId());
this.state = State.Inactive;
this.fetchThreadsScheduler = undefined;
if (this.raw) {
this.raw.disconnect();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册