From feff7c8a7e1c82320380f42d898a1e03051fefb7 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Thu, 25 Jan 2024 16:00:27 -0800 Subject: [PATCH] debug: fix closeReadonlyTabsOnEnd not working (#203500) The input itself is not readonly, the filesystem is, so this check was always failing. The entire `debug` scheme is readonly, so we don't need to try to replace the check with anything else. This is pretty safe since this code path is only hit when the new setting is enabled. Closes #197949 --- src/vs/workbench/contrib/debug/browser/debugService.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugService.ts b/src/vs/workbench/contrib/debug/browser/debugService.ts index 805156e1210..07116a63fa3 100644 --- a/src/vs/workbench/contrib/debug/browser/debugService.ts +++ b/src/vs/workbench/contrib/debug/browser/debugService.ts @@ -710,10 +710,7 @@ export class DebugService implements IDebugService { if (this.configurationService.getValue('debug').closeReadonlyTabsOnEnd) { const editorsToClose = this.editorService.getEditors(EditorsOrder.SEQUENTIAL).filter(({ editor }) => { - if (editor.resource?.scheme === DEBUG_SCHEME) { - return editor.isReadonly() && session.getId() === Source.getEncodedDebugData(editor.resource).sessionId; - } - return false; + return editor.resource?.scheme === DEBUG_SCHEME && session.getId() === Source.getEncodedDebugData(editor.resource).sessionId; }); this.editorService.closeEditors(editorsToClose); }