Respect debug.console.closeOnEnd setting even when the debug console has been moved to another view. (#151535)

Close whichever view container contains the debug console.
Fixes #148616
This commit is contained in:
Rob Lourens 2022-06-08 10:30:59 -07:00 committed by GitHub
parent 4213c8e810
commit 0ff2646b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -690,8 +690,11 @@ export class DebugService implements IDebugService {
const dataBreakpoints = this.model.getDataBreakpoints().filter(dbp => !dbp.canPersist);
dataBreakpoints.forEach(dbp => this.model.removeDataBreakpoints(dbp.getId()));
if (this.viewsService.isViewVisible(REPL_VIEW_ID) && this.configurationService.getValue<IDebugConfiguration>('debug').console.closeOnEnd) {
this.viewsService.closeView(REPL_VIEW_ID);
if (this.configurationService.getValue<IDebugConfiguration>('debug').console.closeOnEnd) {
const debugConsoleContainer = this.viewDescriptorService.getViewContainerByViewId(REPL_VIEW_ID);
if (debugConsoleContainer && this.viewsService.isViewContainerVisible(debugConsoleContainer.id)) {
this.viewsService.closeViewContainer(debugConsoleContainer.id);
}
}
}
}));