debug session become inactive when shutdown. Also more precise listeners for session changes
fixes #58308
This commit is contained in:
parent
2adc5cccce
commit
97e20be47c
3 changed files with 8 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue